diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 84ced5edcfcb4b42a47bb9677d3b6447f2fd1927..667b51655dd58000fbecf75e03c608901a9f93a9 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -138,7 +138,9 @@ macos-superbuild-prepare:
     # No need to install lfs as this machine is persistent
     # No need to do git config
     # Checkout the expected branch
+    - export GIT_LFS_SKIP_SMUDGE=1
     - git checkout -f -q $CI_COMMIT_SHA
+    - export GIT_LFS_SKIP_SMUDGE=0
   script:
     - ctest -VV -S CI/prepare_superbuild.cmake -DIMAGE_NAME:string=otb-macos-superbuild