git gui not working after installing in Mac (e.g. Mountain Lion)

Viewed 44819

When I ran git gui, I got this:

$ git gui
git: 'gui' is not a git command. See 'git --help'.

Did you mean one of these?
    grep
    init
    pull
    push

But I ran other git commands fine, including gitk. How can I fix this?

Thanks.

9 Answers

Seems like in mid-2021 all answers got obsolete (even mine!), so here's my new answer:

brew install git-gui || brew upgrade git-gui
git gui || /usr/local/opt/git/bin/git gui

OLD ANSWER: Seems like in late 2017 all answers above got obsolete, so here's my new answer:

brew install git || brew upgrade git
git gui || /usr/local/opt/git/bin/git gui

2020

brew install git
brew install git-gui
git config --global --add alias.gui '!sh -c '/usr/local/opt/git/libexec/git-core/git-gui''

Now, enjoy:

git gui
Related