我正在尝试将git-lfs与Visual Studio Online Git存储库一起用来存储代码以及一些大型CSV数据文件。
我下载了git-lfs安装程序,重新启动了git-bash,运行了git lfs install
,克隆了一个空的repo,然后运行了git lfs track "*.csv"
。然后我提交了代码和CSV文件,并运行git push origin master
。我收到了这个警告:
Remote "origin" does not support the LFS locking API. Consider disabling it with:
$ git config 'lfs.https://company.visualstudio.com/DefaultCollection/ProjectName/_git/reponame.git/info/lfs.locksverify' false
Git LFS: (0 of 0 files, 135 skipped) 0 B / 0 B, 3.75 GB skipped
Counting objects: 261, done.
然后我尝试将repo克隆到一个新目录,看看它是否正常工作。我收到这些错误:
Downloading data/data.csv (738.83 MB)
Error downloading object: data/data.csv(**********************************************47505bb25a3e2a552e)
error: external filter git-lfs smudge -- %f failed 2
error: external filter git-lfs smudge -- %f failed
fatal: data/data.csv: smudge filter lfs failed
warning: Clone succeeded, but checkout failed.
我做错了什么?如何让git-lfs与VSO Git存储库一起使用?
答案 0 :(得分:1)
请检查以下步骤:
1.检查.gitattributes
是否也受git版本控制。如果它有内容:
*.csv filter=lfs diff=lfs merge=lfs –text
2.使用命令
git config 'lfs.https://company.visualstudio.com/DefaultCollection/ProjectName/_git/reponame.git/info/lfs.locksverify' false
并git config-l
仔细检查,并检查git config是否包含:
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.required=true
filter.lfs.process=git-lfs filter-process