Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I just installed git 1.6.0 from source, but strange thing now happening to me:

debian:~/git# git version
git version 1.5.6.5
debian:~/git# which git
/usr/local/bin/git
debian:~/git# /usr/local/bin/git version
git version 1.6.0

How can I make 1.6.0 binary default? System is Debian Lenny. Git installed with simple ./configure && make && make all.

share|improve this question
    
Have you considered simply uninstalling version you don't want? –  Zoredache Jun 16 '10 at 17:04
    
@Zoredache I want to understand first. –  Kuroki Kaze Jun 17 '10 at 8:37
add comment

3 Answers 3

up vote 5 down vote accepted

Perhaps your shell is still caching the old mapping. If you use bash, see the builtin 'hash' command, specifically 'hash -r' in order to make it forget old entries, for zsh it's IIRC 'rehash'.

share|improve this answer
    
Thanks, this seems to be the case (I hadn't the chance to try hash, simple reboot and my git is 1.6.0). –  Kuroki Kaze Jun 17 '10 at 8:58
add comment

Edit .bashrc or .profile to specify /usr/local/bin early in PATH.

share|improve this answer
1  
...except that /usr/local/bin already was early in the PATH. Apart from being a Debian default, it was also confirmed by the result of "which". –  andol Jul 6 '10 at 12:15
add comment

I suggest you uninstall the git package provided by your distribution.

But usually you should prefer the distribution package over installing yourself from source, because it will automatically handle upgrades and removal.

I always make packages when i build from source, i never just "make install". This way i won't end up with manually installed cruft clogging the system.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.