# git version not changed after installing new version

14 messages from 2012-01-25 to 2012-01-26. Participants: freefly, Thomas Rast, Kirill Likhodedov, Carlos Martín Nieto, Holger Hellmuth.
Thread: https://gitlist.dev/t/29444

## freefly, 2012-01-25 16:45

Subject: git version not changed after installing new version
Message-ID: <loom.20120125T173801-500@post.gmane.org>
URL: https://gitlist.dev/e/loom.20120125T173801-500%40post.gmane.org

```
Hi all,
    I am new to Mac OS X lion and I had a previous installation of XCODE 4.2
on my mac mini. It has a git version 1.7.5.4. I installed a new version 1.7.8.4.
and updated the Path variables by running the script comes with the 
package as well. but when I type "git --version" in the terminal 
I get 1.7.5.4. Can anyone tell me what is going wrong ?

Kind regards

```

## Kirill Likhodedov, 2012-01-25 16:57

Subject: Re: git version not changed after installing new version
Message-ID: <52E83BE7-8D1C-4A9C-AA86-DBC58435C299@gmail.com>
URL: https://gitlist.dev/e/52E83BE7-8D1C-4A9C-AA86-DBC58435C299%40gmail.com
In-Reply-To: <loom.20120125T173801-500@post.gmane.org>

```
Most likely, you  didn't update the PATH well enough.
Check what is the output of 'which git' command. It will point to the xcode installation. So please double check the path.

25.01.2012, в 20:45, freefly:

> Hi all,
>    I am new to Mac OS X lion and I had a previous installation of XCODE 4.2
> on my mac mini. It has a git version 1.7.5.4. I installed a new version 1.7.8.4.
> and updated the Path variables by running the script comes with the 
> package as well. but when I type "git --version" in the terminal 
> I get 1.7.5.4. Can anyone tell me what is going wrong ?
> 
> Kind regards
> 
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

```

## Thomas Rast, 2012-01-25 17:03

Subject: Re: git version not changed after installing new version
Message-ID: <8739b3k949.fsf@thomas.inf.ethz.ch>
URL: https://gitlist.dev/e/8739b3k949.fsf%40thomas.inf.ethz.ch
In-Reply-To: <loom.20120125T173801-500@post.gmane.org>

```
freefly <free.fly@live.com> writes:

> Hi all,
>     I am new to Mac OS X lion and I had a previous installation of XCODE 4.2
> on my mac mini. It has a git version 1.7.5.4. I installed a new version 1.7.8.4.
> and updated the Path variables by running the script comes with the 
> package as well. but when I type "git --version" in the terminal 
> I get 1.7.5.4. Can anyone tell me what is going wrong ?

Enter 'which git' in a terminal.  The 'which' utility looks up which
executable from $PATH will be run if you use 'git' (in this case) as a
command word, i.e., without specifying its path.

This should point to your newly installed git.  It probably doesn't, and
you can compare it and your $PATH (try: 'echo "$PATH"' in a terminal) to
see why.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

```

## freefly, 2012-01-25 17:19

Subject: Re: git version not changed after installing new version
Message-ID: <loom.20120125T181639-351@post.gmane.org>
URL: https://gitlist.dev/e/loom.20120125T181639-351%40post.gmane.org
In-Reply-To: <loom.20120125T173801-500@post.gmane.org>

```
Thanks both of you for your replies, I have checked but, 
it still points to the old "/usr/bin/git" not the 
"/usr/local/git/bin" :(

when I run the update path script I get this output.


No change to PATH in ~/.MacOSX/environment.plist
~ /Volumes/Git 1.7.8.3 Snow Leopard Intel Universal
/Volumes/Git 1.7.8.3 Snow Leopard Intel Universal

```

## Carlos Martín Nieto, 2012-01-25 18:57

Subject: Re: git version not changed after installing new version
Message-ID: <1327517841.31804.75.camel@centaur.lab.cmartin.tk>
URL: https://gitlist.dev/e/1327517841.31804.75.camel%40centaur.lab.cmartin.tk
In-Reply-To: <loom.20120125T181639-351@post.gmane.org>

```
On Wed, 2012-01-25 at 17:19 +0000, freefly wrote:
> Thanks both of you for your replies, I have checked but, 
> it still points to the old "/usr/bin/git" not the 
> "/usr/local/git/bin" :(

What do `which git` and `type git` say? Bash remembers where it ran a
command so if you install a binary to a new location, it might not find
it straight away.

> 
> when I run the update path script I get this output.
> 
> 
> No change to PATH in ~/.MacOSX/environment.plist
> ~ /Volumes/Git 1.7.8.3 Snow Leopard Intel Universal
> /Volumes/Git 1.7.8.3 Snow Leopard Intel Universal

So the script detected that no change was needed presumably. What's your
$PATH and is /usr/local/bin/ before /usr/bin/?

   cmn

```

## freefly, 2012-01-25 19:32

Subject: Re: git version not changed after installing new version
Message-ID: <loom.20120125T202642-92@post.gmane.org>
URL: https://gitlist.dev/e/loom.20120125T202642-92%40post.gmane.org
In-Reply-To: <1327517841.31804.75.camel@centaur.lab.cmartin.tk>

```


> What do `which git` and `type git` say? Bash remembers where it ran a
> command so if you install a binary to a new location, it might not find
> it straight away.

which git => /usr/bin/git

type git => git is hashed (/usr/bin/git)

> So the script detected that no change was needed presumably. What's your
> $PATH and is /usr/local/bin/ before /usr/bin/?
 
echo $PATH => /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:
                         /usr/X11/bin:/usr/local/git/bin:/opt/local/bin

from the above output it is not before /usr/bin :(

```

## Carlos Martín Nieto, 2012-01-25 19:58

Subject: Re: git version not changed after installing new version
Message-ID: <1327521489.31804.85.camel@centaur.lab.cmartin.tk>
URL: https://gitlist.dev/e/1327521489.31804.85.camel%40centaur.lab.cmartin.tk
In-Reply-To: <loom.20120125T202642-92@post.gmane.org>

```

Please don't cull the CC list. It's customary in the git ML to send a
copy of the message to each participant.

On Wed, 2012-01-25 at 19:32 +0000, freefly wrote:
> 
> > What do `which git` and `type git` say? Bash remembers where it ran a
> > command so if you install a binary to a new location, it might not find
> > it straight away.
> 
> which git => /usr/bin/git
> 
> type git => git is hashed (/usr/bin/git)
> 
> > So the script detected that no change was needed presumably. What's your
> > $PATH and is /usr/local/bin/ before /usr/bin/?
>  
> echo $PATH => /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:
>                          /usr/X11/bin:/usr/local/git/bin:/opt/local/bin
> 
> from the above output it is not before /usr/bin :(

There you go then. That should get set in ~/.bashrc so edit that file to
change the order.

   cmn


```

## freefly, 2012-01-25 20:20

Subject: Re: git version not changed after installing new version
Message-ID: <loom.20120125T211638-609@post.gmane.org>
URL: https://gitlist.dev/e/loom.20120125T211638-609%40post.gmane.org
In-Reply-To: <1327521489.31804.85.camel@centaur.lab.cmartin.tk>

```
> Please don't cull the CC list. It's customary in the git ML to send a
> copy of the message to each participant.
> 

> There you go then. That should get set in ~/.bashrc so edit that file to
> change the order.
> 
>    cmn

I didn't the rules about ML and culling some of them 
have guidelines to reduce the noise. 

So you want me to edit the ~/.bashrc 
and put change the order of those paths ?

```

## freefly, 2012-01-25 20:23

Subject: Re: git version not changed after installing new version
Message-ID: <loom.20120125T212203-813@post.gmane.org>
URL: https://gitlist.dev/e/loom.20120125T212203-813%40post.gmane.org
In-Reply-To: <1327521489.31804.85.camel@centaur.lab.cmartin.tk>

```

Sorry about the last post, I had to prune some things from the message,
because when I was trying to post it just keep telling me that 
I have more quoted text than what I have written :(

```

## Carlos Martín Nieto, 2012-01-25 22:29

Subject: Re: git version not changed after installing new version
Message-ID: <1327530594.31804.87.camel@centaur.lab.cmartin.tk>
URL: https://gitlist.dev/e/1327530594.31804.87.camel%40centaur.lab.cmartin.tk
In-Reply-To: <loom.20120125T211638-609@post.gmane.org>

```
On Wed, 2012-01-25 at 20:20 +0000, freefly wrote:
> > Please don't cull the CC list. It's customary in the git ML to send a
> > copy of the message to each participant.
> > 
> 
> > There you go then. That should get set in ~/.bashrc so edit that file to
> > change the order.
> > 
> >    cmn
> 
> I didn't the rules about ML and culling some of them 
> have guidelines to reduce the noise. 
> So you want me to edit the ~/.bashrc 
> and put change the order of those paths ?

With the places you've installed git in, that's what you need to do. You
need to tell your shell to look at /usr/local/bin before /usr/bin,
otherwise it won't use your locally-installed git.

   cmn

```

## freefly, 2012-01-26 14:33

Subject: Re: git version not changed after installing new version
Message-ID: <loom.20120126T144828-400@post.gmane.org>
URL: https://gitlist.dev/e/loom.20120126T144828-400%40post.gmane.org
In-Reply-To: <1327530594.31804.87.camel@centaur.lab.cmartin.tk>

```
 
Thanks ... 
I really appreciate your time.  

```

## freefly, 2012-01-26 15:13

Subject: Re: git version not changed after installing new version
Message-ID: <loom.20120126T161101-463@post.gmane.org>
URL: https://gitlist.dev/e/loom.20120126T161101-463%40post.gmane.org
In-Reply-To: <loom.20120126T144828-400@post.gmane.org>

```
that doesn't seem to change the path :(

which git => /usr/bin/git

version still points to the old one  :(

This is my current path that I changed, as you told me to do... 

/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin:/usr/local/git/bin

```

## Holger Hellmuth, 2012-01-26 16:52

Subject: Re: git version not changed after installing new version
Message-ID: <4F2184DC.6070804@ira.uka.de>
URL: https://gitlist.dev/e/4F2184DC.6070804%40ira.uka.de
In-Reply-To: <loom.20120126T161101-463@post.gmane.org>

```
On 26.01.2012 16:13, freefly wrote:
> that doesn't seem to change the path :(
>
> which git =>  /usr/bin/git
>
> version still points to the old one  :(
>
> This is my current path that I changed, as you told me to do...
>
> /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin:/usr/local/git/bin

Put /usr/local/git/bin in front (it is easy to overlook the "git/" in 
there as software often uses /usr/local/bin)

```

## freefly, 2012-01-26 17:52

Subject: Re: git version not changed after installing new version
Message-ID: <loom.20120126T185158-378@post.gmane.org>
URL: https://gitlist.dev/e/loom.20120126T185158-378%40post.gmane.org
In-Reply-To: <4F2184DC.6070804@ira.uka.de>

```
> Put /usr/local/git/bin in front (it is easy to overlook the "git/" in 
> there as software often uses /usr/local/bin)

That worked. Thank you very much.

```
