我开始用 git-lfs 跟踪一些文件。在我的下一个git push,我收到恒定(审查)的消息:
Locking support detected on remote "origin". Consider enabling it with:
$ git config lfs.<repo_url>.git/info/lfs.locksverify true
Run Code Online (Sandbox Code Playgroud)
当我运行时git config lfs.<repo_url>.git/info/lfs.locksverify true,命令成功退出并且没有输出,并且相同的消息继续与每个git push.
考虑到我们围绕 git 输出编写了自动化脚本,如何禁用此消息?现在每个使用我的 repo 的 git 客户端都必须运行相同的修复吗?
当您运行时$ git config lfs.<repo_url>.git/info/lfs.locksverify true,它会添加到您的 git 工作区/本地配置文件中。当您重新克隆工作区时,它不存在。
您可以通过运行来验证这一点$ git config --list
为了避免每次都询问这个问题,请--global在构建机器中添加您的全局/系统 () git 配置。
$ git config lfs.<repo_url>.git/info/lfs.locksverify true --global