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.
Basically all you need to do is type 'open . ' to open the current directory in Finder and then click the Git button to open up git gui.
Go to Programs > Git and select Git Bash . We'll refer to both Mac's Terminal and Window's Git Bash as just Bash. You should have been returned a line with the version number, this means that git was correctly installed and is up and running!
GitFinder is a git GUI for macOS computers that run on macOS 10.11. 5+ operating systems. It combines a version control system or Git with a Finder module.
Edit your git config to an add an entry for gui in the alias section
nano ~/.gitconfig
[alias]
gui = !sh -c '/usr/local/git/libexec/git-core/git-gui'
It looks like the path in the original answer is now obsolete. Updated instructions:
[alias]
gui = !sh -c '/usr/local/opt/git/bin/git gui'
This post: http://www.cmsimike.com/blog/2012/07/30/git-gui-and-osx-mountain-lion/ saves me.
Edit ~/.bash_profile
and put in
alias gui='/usr/local/git/libexec/git-core/git-gui'
Now the new command is gui
instead of git gui
.
EDIT (28 Jan 2013)
I have found a better answer to why git gui
wasn't working: Did Apple remove the 'git gui' command in XCode 4.5 command line tools?. Please refer to this solution instead.
Apple did indeed remove the 'git gui' command. I decided to just homebrew git instead of relying on the XCode command line tools.
brew install git
Then I edited the /etc/paths file to have the /usr/local/bin directory come before the /usr/bin directory, because that wasn't right either. Then exited the terminal window and restarted, and now I get:
$ which git /usr/local/bin/git $ git --version git version 1.7.12.1
and the git gui command works again.
EDIT (2020-02-03)
As of version 2.25.0_1, git gui
is now provided by a separate formula in brew, named git-gui
. See the following PR and issues for the background to this change: https://github.com/Homebrew/homebrew-core/pull/49136
So along with installing Homebrew's git
, to have access to git gui
one must run
brew install git-gui
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With