Motivation
Sometimes we donβt want to download all LFS files all at one (with
git clone
), so we can use skip-smudge
to create pointers for all LFS files first, and then download only what we really need.Β
Steps
- install
skip-smudge
function forgit lfs
git lfs install --skip-smudge
- clone the repo with only pointers
# linux GIT_LFS_SKIP_SMUDGE=1 git clone [repo.url] # windows set GIT_LFS_SKIP_SMUDGE=1; git clone [repo.url] cd [repo]
- pull down selected file
git lfs pull --include "file.name"
Β
Done π
If you want to transfer a downloaded LFS file back into a pointer
git lfs pointer --file="filename" > filename.pt mv filename.pt filename