我为 Windows 安装了 git-lfs。Git Bash
对于和来说,这似乎都在我的道路上PowerShell
。这是来自的输出Git Bash
502618458@G13G3Q72E MINGW64 ~
$ which git-lfs
/c/Program Files/Git LFS/git-lfs
502618458@G13G3Q72E MINGW64 ~
$ git lfs version
git-lfs/1.4.4 (GitHub; windows amd64; go 1.7.3; git cbf91a9)
然而,当我运行时:
$ git lfs install
Updated pre-push hook.
Git LFS initialized.
我得到以下内容pre-push
。
#!/bin/sh
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/pre-push.\n"; exit 2; }
git lfs pre-push "$@"
我试过删除pre-push
钩子并重新安装,我仍然得到相同的结果。
我测试了推送应该跟踪的文件... Used git lfs track
, added.gitattributes
和跟踪的文件,但它被推送到常规 git repo 而不是 git-lfs 存储中。
知道为什么我无法git lfs install
将正确的内容放入pre-push
钩子或知道任何解决方法吗?