Using git-gui on Mac with Homebrew

/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'

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