Rick Cogley's Tech Logr

Short Technical Laser Bursts %%

RC Logr 20200604 111524

Thursday, 4 Jun, 2020

When doing development on a Mac, you might discover the system is not finding something you installed via brew, and is rather defaulting to an older version included with MacOS stored in /usr/bin. 🤨 To fix, just specify the bin path of the app you installed, in your .zshrc (assuming zsh).

1
2
# use latest brew git and not the Apple one
export PATH="/usr/local/opt/git/bin:$PATH"

Prove it like this:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
> which git
/usr/local/bin/git
> /usr/local/bin/git --version
git version 2.27.0
> whereis git
/usr/bin/git
> /usr/bin/git --version
git version 2.24.3 (Apple Git-128)
> git --version
git version 2.27.0

Q.e.d.

RC Logr 20200604 111524 - When doing development on a … Rick Cogley
Back to Home Tweet Link