git - Homebrew 更新不断提示 git-lfs 但问题出在哪个 repo 协议(protocol)上

标签 git homebrew git-lfs

我似乎再也无法让 Homebrew 软件正常工作了。试过uninstall and install it .但它一直向我抛出关于 git lfs 的错误,我看不出它来自哪里。

我完全没有想法 - 这是我到目前为止所做的:

❯ git lfs install
Git LFS initialized.

❯ brew update --verbose
Checking if we need to fetch /usr/local/Homebrew...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/caskformula/homebrew-caskformula...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/homebrew/homebrew-bundle...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/homebrew/homebrew-services...
Fetching /usr/local/Homebrew...
Updating /usr/local/Homebrew...
Branch 'master' set up to track remote branch 'master' from 'origin'.
Switched to and reset branch 'master'
Your branch is up to date with 'origin/master'.

This 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/post-checkout.

Switched to and reset branch 'stable'

This 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/post-checkout.

Current branch stable is up to date.

Already up-to-date.
❯ cat .gitconfig
[core]
    editor = code --wait
    excludesfile = /Users/norfeldt/.gitignore_global
    hooksPath = /Users/norfeldt/Dropbox/Code/Git/hooks

    quotepath = false
    # The default value is true.

    precomposeunicode = true 
    # Only used by Mac OS implementation of Git.

    ...

[filter "lfs"]
    clean = git-lfs clean -- %f
    smudge = git-lfs smudge -- %f
    process = git-lfs filter-process
    required = true
[diff]
    ...
❯ cat Dropbox/Code/Git/hooks/pre-push
#!/bin/sh
command echo $PWD
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 "$@"
❯ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: A newer Command Line Tools release is available.
Update them from Software Update in System Preferences or run:
  softwareupdate --all --install --force

If that doesn't show you an update run:
  sudo rm -rf /Library/Developer/CommandLineTools
  sudo xcode-select --install

Alternatively, manually download them from:
  https://developer.apple.com/download/more/.

最佳答案

解决方案似乎是

$ cd $(brew --repo)/Library/Taps/homebrew/homebrew-core/.git/hooks
$ git-lfs uninstall

https://github.com/Homebrew/discussions/discussions/32#discussioncomment-92562

关于git - Homebrew 更新不断提示 git-lfs 但问题出在哪个 repo 协议(protocol)上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64210163/

相关文章:

git - 如何复制一个 git 仓库? (没有 fork )

python - Brew 无法链接 jpeg

javascript - 访问存储在 GitHub LFS 中的静态 .obj 文件

git - Git-Extensions 是否支持 git lfs?

git - 将 git lfs ls-files 与 git ls-files ':(attr:filter=lfs)' 进行比较是一种检测不受 lfs 管理的 lfs 文件的可靠方法吗?

git 扩展和 *.xls

git - 使用嵌套的 Git 子模块时释放多个 Maven Artifact

Git 在一个命令中添加和提交

macos - 使用 OS X 10.10 Yosemite Beta 使用 Homebrew 重新安装 MongoDB 时遇到问题

opencv - 如何在 OSX 下使用 brew 安装 opencv2