Skip to content

Instantly share code, notes, and snippets.

Last active November 30, 2023 22:39
  • Star 15 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Git skip LFS on local repo

Because GitKraken and SourceTree are FUCKING SLOW for repo with large LFS objects.

Need to completely skip LFS operation when pull/fetch/checkout/...

Skip downloading when clone


Skip downloading when fetch/checkout/pull

  1. Edit .git/config
[filter "lfs"]
        clean = git-lfs clean -- %f
        smudge = git-lfs smudge --skip
        process = git-lfs filter-process --skip
        checkout =
        required = false
        fetchexclude = *

such that LFS will not download objects from remote, even if git lfs pull

Remove LFS objects from existing repo

  1. remove all LFS files
  2. rm -f .git/lfs/objects/*, so LFS will not copy from disk.
  3. git reset HEAD --hard

works fine with command line, GitKraken and SourceTree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment