I'm just curious, Where Git get installed (via DMG) on Mac OS X file system?
11 Answers
Is it in your PATH? If so just run which git in the terminal and it will tell you.
2 Comments
Ciasto piekarz
this will give the path of the git binary file not the git installation directory.
Merchako
If you're trying to sort through multiple
git installations, which -a git will tell you all of them in your PATH.The installer from the git homepage installs into /usr/local/git by default. See also this answer. However, if you install XCode4, it will install a git version in /usr/bin. To ensure you can easily upgrade from the website and use the latest git version, edit either your profile information to place /usr/local/git/bin before /usr/bin in the $PATH or edit /etc/paths and insert /usr/local/git/bin as the first entry (see this answer).
2 Comments
emkman
I first installed git 1.8 via dmg, but then installed the Command Line Tools for XCode (not the full XCode4) from Apple which installed 1.7. Placing /usr/local/git/bin in the front of my path got me using 1.8 again. Thanks!
Mohammad Arif
Cool, it worked for me too on 10.8.4, had the old version and new installation was not reflecting, changing order in /etc/paths works.
/usr/local/git//usr/local/git/libexec/git-core/usr/bin/giton OS X 10.9.5 and XCode 6.1whereis git