Locate Git installation folder on Mac OS X

GitMacos

Git Problem Overview


I'm just curious, Where Git get installed (via DMG) on Mac OS X file system?

Git Solutions


Solution 1 - Git

Is it in your PATH? If so just run which git in the terminal and it will tell you.

Solution 2 - Git

The installer from [the git homepage][2] installs into /usr/local/git by default. See also [this answer][1]. 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][3]).

[1]: https://stackoverflow.com/questions/4725389/how-to-get-started-with-git-on-mac/4725627#4725627 "this answer" [2]: http://git-scm.com/ [3]: https://stackoverflow.com/questions/5364340/does-xcode-4-install-git/5365851#5365851

Solution 3 - Git

simply type in which git in your terminal window and it will show you exactly where it was installed.

Solution 4 - Git

you can simply use this command on a terminal to find out git on unix platforms (mac/linux) -

whereis git

This command should return something like - /usr/bin/git or any other location where git is installed

Solution 5 - Git

On most of UNIX based sys, its at /usr/bin/git (if installed with default options)
all git related scripts are at /usr/libexec/git-core

Solution 6 - Git

Usually some of the applications have been known to take it from the Xcode.app path also: /Applications/Xcode.app/Contents/Developer/usr/bin/

Coda 2, prefers this path than the soft link at /usr/bin.

Solution 7 - Git

You can also try with /usr/local/bin/git it worked for me

Solution 8 - Git

Mostly in /usr/local/git (there are also /etc/paths.d/git and /etc/manpaths.d/git items).

Solution 9 - Git

On Linux the command is whereis. Alternatively you can issue find / -name git and wait for an eternity. Alternatively try echo $PATH | sed "s/:/ /g" | xargs -L 1 ls | grep git

Solution 10 - Git

If you have fresh installation / update of Xcode, it is possible that your git binary can't be executed (I had mine under /usr/bin/git). To fix this problem just run the Xcode and "Accept" license conditions and try again, it should work.

Solution 11 - Git

On Mojave

The binary is in

/usr/bin/git

The related scripts are here

/Applications/Xcode.app/Contents/Developer/usr/libexec/git-core/git

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionChironView Question on Stackoverflow
Solution 1 - GitscottdView Answer on Stackoverflow
Solution 2 - GitBHMulderView Answer on Stackoverflow
Solution 3 - GitRay FitzgeraldView Answer on Stackoverflow
Solution 4 - GitsahilabrarView Answer on Stackoverflow
Solution 5 - GittheSTIGView Answer on Stackoverflow
Solution 6 - GitgagneetView Answer on Stackoverflow
Solution 7 - GitGastón SaillénView Answer on Stackoverflow
Solution 8 - GitAmberView Answer on Stackoverflow
Solution 9 - GitNovikovView Answer on Stackoverflow
Solution 10 - GitMatej P.View Answer on Stackoverflow
Solution 11 - GitMark IrvinView Answer on Stackoverflow