Locate the Git installation folder on Mac OS X

I'm just wondering where to install Git (via DMG) in the Mac OS X file system?

+75
git macos
02 Sep 2018-10-10T00:
source share
9 answers

The installer from the git homepage is installed by default / usr / local / git . See also this answer . However, if you install Xcode4, it will install the git version in / usr / bin . So that you can easily upgrade from the site and use the latest version of git, either edit your profile information to place / usr / local / git / bin to / usr / bin in $ PATH or edit / etc / paths and paste / usr / local / git / bin as the first entry ( see this answer ).

+108
Aug 17 '11 at 8:24
source share

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

+134
Sep 02 '10 at 4:19
source share

just enter which git in the terminal window and it will show you exactly where it was installed.

+27
Feb 23 '14 at 21:37
source share

On most UNIX systems, at the /usr/bin/git level (if installed with the default settings)
all git related scripts are in /usr/libexec/git-core

+6
Sep 02 '10 at 19:59
source share

Typically, some of the applications are also known to take it from the Xcode.app path: /Applications/Xcode.app/Contents/Developer/usr/bin/

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

+3
Jan 24 '14 at 23:24
source share

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

+2
Sep 02 2018-10-10 at
source share

On Linux, the whereis command. Alternatively, you can give find / -name git and wait forever. Alternatively try echo $PATH | sed "s/:/ /g" | xargs -L 1 ls | grep git echo $PATH | sed "s/:/ /g" | xargs -L 1 ls | grep git

+2
Sep 02 '10 at 4:25
source share

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

+1
01 Oct '18 at 3:05
source share

If you have a new installation / update of Xcode, it is possible that your git binary cannot be executed (I had mine under /usr/bin/git ). To fix this problem, simply run the Xcode and Accept license terms and try again, it should work.

0
Jul 18 '16 at 14:59
source share



All Articles