git - “git lfs migrate”中是否包含“git lfs install”?
问题描述
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 的过滤器命令安装到用户~/.gitconfig
文件和当前存储库中的挂钩中。git lfs install
当第一次在存储库中调用某些 Git LFS 命令时,也会安装这些钩子,但只有在已运行或已适当配置过滤器时才会发生这种情况。
除了安装挂钩外,该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 在不运行git lfs install
.
如果您使用的是 Debian 的 Git LFS,可能已经为您设置了过滤器命令,您可以通过检查/etc/gitconfig
. 如果是这样,您不需要自己运行它们,尽管您可能想要以防万一您最终使用非 Debian 系统。
推荐阅读
- ubuntu - 自定义终端以将长 CLI 终端命令映射到短命令
- pine-script - pinescript 如何使在 if 语句中声明的变量全局可用
- x86-64 - 如果程序包含某些 CPU 不支持的指令,会发生什么情况?
- r - Rstudio 终端输出到对象
- java - Hibernate 中的继承与组合
- python - 从另一个文件导入列表
- javascript - React Native Navigation:在另一个文件的函数内部时无法在堆栈之间导航
- python - 如何添加标题并仅使用 plt.figure 摆脱轴
- node.js - React Web 应用程序代理
- python - 如何将 MongoDB ISO UTC 日期与 Python 相互转换