Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disabling GIT LFS for GitLab CI

Tags:

git

gitlab

How can configure the GitLab CI runners to clone without downloading the LFS files? Those files are not needed for the tests and it would speed up our development workflow significantly. Any help is very much appreciated!

I have only encountered the same question on reddit: link with unfortunately no useful answers. Note that I also posed the question the gitlab forum two months ago (link) with no luck so far.

like image 660
Maximilian Schulz Avatar asked Jan 28 '23 14:01

Maximilian Schulz


1 Answers

You can try setting the variable GIT_LFS_SKIP_SMUDGE=1

variables:
  GIT_LFS_SKIP_SMUDGE: "1"

or take control over the git checkout call, and set lfs.fetchexclude beforehand

variables:
  GIT_STRATEGY: clone
  GIT_CHECKOUT: "false"
script:
  - git config lfs.fetchexclude "*"
  - git checkout $CI_COMMIT_REF_NAME
like image 173
Nils Werner Avatar answered Feb 05 '23 15:02

Nils Werner