Skip to contentSkip to conversation

git version not changed after installing new version

DISCUSSION freefly 5 participants 14 messages Jun 15, 2016

lore
Share & tools
lore

freefly

author
#0 lore raw

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

#1 lore raw

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:

Quoted 13 lines

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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
In reply to freefly
Quoted 6 lines · 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 ?

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.

Signature · 2 lines
Thomas Rast
trast@{inf,student}.ethz.ch
author
#3 lore raw
In reply to freefly

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

#4 lore raw
Quoted 3 lines · freefly

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.

Quoted 7 lines

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

author
#5 lore raw
Quoted 5 lines

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)

Quoted 2 lines

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 :(

#6 lore raw

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

Quoted 9 lines · freefly
Quoted 4 lines

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)

Quoted 7 lines
Quoted 2 lines

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

author
#7 lore raw
Quoted 8 lines

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 ?

#8 lore raw
Quoted 7 lines · freefly
Quoted 7 lines

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.

Quoted 6 lines
Quoted 1 line

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

author
#9 lore raw

Thanks ...
I really appreciate your time.

author
#10 lore raw

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

#11 lore raw
Quoted 9 lines · freefly

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)

author
#12 lore raw
Quoted 2 lines

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.

author
#13 lore raw
In reply to Carlos Martín Nieto

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 :(