Git Large File Storage (LFS) 是 Git 的一个扩展,它替代 Git 来管理大型文件,比如音频、视频、图形文件和其他二进制大对象(blobs)。Git LFS 通过将这些大文件的指针存储在本地仓库中,并把实际文件存储在一个单独的服务器上来工作,这个服务器通常是托管代码库的地方,如 GitHub、GitLab 或 Bitbucket。
在用Git去clone的时候遇到以下问题:
Use git lfs logs last to view the log.
error: external filter 'git-lfs filter-process' failed
fatal: data/processed/career_builder/embedding.npy: smudge filter lfs failed
warning: Clone succeeded, but checkout failed.
解决方案:
#1.
git lfs install --skip-smudge
git config --global core.longpaths true#2.
#Skip smudge - We'll download binary files later in a faster batch
git lfs install --skip-smudge
#Do git clone here
git clone ...
#Fetch all the binary files in the new clone
git lfs pull
# Reinstate smudge
git lfs install --force
参考:
https://github.com/git-lfs/git-lfs/issues/911
https://kerwenzhang.github.io/git/2020/04/14/Git-LFS-issue/