5 ms·
What's an easy way to fix the default git installation on OSX?
by toomim 6y ago
What's an easy way to fix the default git installation on OSX?
- jhugo 6y agoWait for a macOS security update that includes it. If you don’t want to wait, macports and homebrew will both be patched much faster.
- jonahx 6y agobrew install git
- mdasen 6y agoI did a `brew install git` and then deleted /Library/Developer/CommandLineTools/usr/bin/git. You can't delete /usr/bin/git even with sudo (system integrity policy). After installing git via brew and removing the one in CommandLineTools, /usr/bin/git is showing the latest version. me@local % git --version git version 2.30.2 I don't know if this is recommended or if it will have negative consequences that i don't know about, but it seemed like the way I could accomplish it. Given that /usr/bin/git is working with the homebrew installed git, I'm hopeful that everything will be good.
- Zambyte 6y agoI don't use Mac, so I can't speak yo how the changes you made will affect your system. For future reference however, you should know that binaries are searched on your $PATH in order. Instead of deleting anything, you could have edited your $PATH variable so that the directory that brew stores binaries in is searched before other locations.