Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git --version displays wrong version on Terminal

I am using homebrew to update git. I typed: brew install git

And homebrew tells me git 2.28 is already installed and up-to-date. But, when I type:

git --version

I get:

git version 2.15.0

Why might this be happening and how do I fix it?

I've read that it might have to do with the $PATH, which I do not fully understand. When I type which git

I get: /usr/local/bin/git

like image 517
Katherine Avatar asked Oct 30 '25 09:10

Katherine


1 Answers

Ah. Now I figured out the issue.

I needed to update my shell. Then, when I typed brew install git it said:

Warning: git 2.28.0 is already installed, it's just not linked

So I typed

brew link git

To link the version.

like image 187
Katherine Avatar answered Nov 01 '25 23:11

Katherine



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!