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

debian:~/git# git version
git version
debian:~/git# which 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.

  • Have you considered simply uninstalling version you don't want?
    – Zoredache
    Commented Jun 16, 2010 at 17:04
  • @Zoredache I want to understand first. Commented Jun 17, 2010 at 8:37

3 Answers 3


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'.

  • Thanks, this seems to be the case (I hadn't the chance to try hash, simple reboot and my git is 1.6.0). Commented Jun 17, 2010 at 8:58

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.


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

  • 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
    Commented Jul 6, 2010 at 12:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .