On Mac OS Mojave 10.14.6, I cannot get my Mac to use home-brews version of git.
Before installing git with homebrew my git looks like this:
$ echo $PATH /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin $ git --version git version 2.21.1 (Apple Git-122.3) $ which git /usr/bin/git
After installing git with homebrew my git looks like this:
$ brew install git ==> **Downloading https://homebrew.bintray.com/bottles/git-2.25.0.mojave.bottle.tar.** Already downloaded: /Users/mark/Library/Caches/Homebrew/downloads/8f367819e74f23704eabce94b3eb0db544bcad743edbf0697b8dc1809cf512cf--git-2.25.0.mojave.bottle.tar.gz ==> **Pouring git-2.25.0.mojave.bottle.tar.gz** ==> **Caveats** Bash completion has been installed to: /usr/local/etc/bash_completion.d zsh completions and functions have been installed to: /usr/local/share/zsh/site-functions Emacs Lisp files have been installed to: /usr/local/share/emacs/site-lisp/git ==> **Summary** 🍺 /usr/local/Cellar/git/2.25.0: 1,523 files, 45.6MB $ echo $PATH /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin $ git --version git version 2.21.1 (Apple Git-122.3) $ which git /usr/local/bin/git
According to which git, Apples version of git is installed in both /usr/local/bin/git as well as /usr/bin/git. How is this possible and why is homebrew installing apples version of git in the homebrew $PATH of /usr/local/bin? How do I get Mac OS to use Home-brews version of git? Please help!
Note: I have Xcode, Xcode command line tools, and GitHub desktop (homebrew cask version) installed also. I’m not sure if that makes any sort of impact on things. Noob here. Thanks for all of the help!