gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-05 02:04:43 24 4
gpt4 key购买 nike

我似乎再也无法让 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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com