Using git-gui on Mac with Homebrew
Solution 1
/usr/local/opt/
contains symlinks to the directories in /usr/local/Cellar/
:
$ ll /usr/local/opt/git
lrwxr-xr-x 1 lauri admin 19B Oct 11 17:07 /usr/local/opt/git -> ../Cellar/git/1.8.4
$ ll /usr/local/opt/git/libexec/git-core/git-gui
-rwxr-xr-x 2 lauri admin 205B Sep 18 23:28 /usr/local/opt/git/libexec/git-core/git-gui
Check the file exists, then add something like this to ~/.gitconfig:
[alias]
gui = !sh -c '/usr/local/opt/git/libexec/git-core/git-gui'
Solution 2
Since version 2.25.0_1 of the git
formula on Homebrew, the git gui
functionality has been separated out into the git-gui
formula. See the following pull request for background on this change: https://github.com/Homebrew/homebrew-core/pull/49136
Because of this, a better solution for to fix a broken git gui
on a Homebrew installation of git
is to run:
brew install git-gui
Related videos on Youtube
jonallard
Updated on September 18, 2022Comments
-
jonallard over 1 year
I have Git installed with Homebrew.
However,
git-gui
doesn't seem to come stock in/usr/local/bin
.This answer suggests I should create an alias to
usr/local/git/libexec/git-core/git-gui
, but this file doesn't exist.The only executable I can find is located in
/usr/local/Cellar/git/1.8.4/share/git-gui
Now this is the alias I used. However, if I ever update Git, I'll have to relink it.
How do I get a permanent reference to
git-gui
?-
rogerdpack over 9 yearsNB that you need git installed from hombrew (not the default) if you want git gui to work at all. For me, after doing that, git gui just works, no extra work needed... (Just run "git gui") FWIW
-
jonallard over 9 years"I have Git installed with Homebrew."
-