I can't seem to get homebrew to work properly anymore. Have tried to uninstall and install it. But it keeps throwing me this error about git lfs
and I can't see where it comes from.
I'm all out of ideas - this is what I have done so far:
❯ 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/.
The solution appeared to be
https://github.com/Homebrew/discussions/discussions/32#discussioncomment-92562