Updating Git on Mac showing previous version

Updating Git on Mac showing previous version

Was trying to pull something to github and noticed I was using a bit old Git version.
Then I went to and downloaded for mac.
After installing, I checked if I have the latest version by doing

git --version

and it showed

git version

Then I suspected the previous one is not updated and checked which git binary is being used

which git

And it replied as


The new one is being save on another directory – /usr/local/git

Then I checked how my path is setup

echo $PATH

it was something like


As you can see the poor mac would see the /usr/bin first to check if command binary is inside it and it would continue.. so it was not checking the /usr/local/git..

Just putting the proper path infront of the path would solve the problem

export PATH=/usr/local/git/bin/:/usr/local/sbin/:$PATH

That would fix the problem. In the mean time, doing some cleanup on the existing git files would help also..

how to add subdirectories in git

You asked to pull from the remote but did not specify the branch github error

Untrack a file in git

Upgrade mysql version from 5.5 to 5.6

install composer and make it globally accessible

Git add not working for folder with .git folder

Leave a Reply

Your email address will not be published. Required fields are marked *