Git-lfs文档说:
Setup Git LFS on your system. You only have to do this once per
repository per machine:
git lfs install
现在,由于我不知道git lfs install
的作用范围,我如何检查git lfs migrate
是否调用了git lfs install
(git lfs migrate
文档中没有说明:https://manpages.debian.org/unstable/git-lfs/git-lfs-migrate.1.en.html)?
git lfs migrate
不调用git lfs install
。您需要为每个用户和机器对运行git lfs install
一次,除非您已经手动适当地设置了过滤器。
该命令将调用Git LFS的filter命令安装到用户的~/.gitconfig
文件和当前存储库中的挂钩中。当第一次在存储库中调用某些Git LFS命令时,也会安装这些挂钩,但只有在运行了git lfs install
或适当配置了过滤器的情况下才会安装这些挂钩。
除了安装挂钩,git lfs install
命令还运行以下命令:
git config --global filter.lfs.process "git-lfs filter-process"
git config --global filter.lfs.smudge "git-lfs smudge -- %f"
git config --global filter.lfs.clean "git-lfs clean -- %f"
运行这些命令或进行等效的编辑,就足以在不运行git lfs install
的情况下使Git LFS正常工作。
如果您使用的是Debian的Git LFS,那么filter命令可能已经为您设置好了,您可以通过检查/etc/gitconfig
来检查这一点。如果是这样的话,你不需要自己运行它们,尽管你可能无论如何都想运行,以防你最终使用非Debian系统。