How do I open the Git GUI from a command window?

24,581

Solution 1

Simply entering

git gui

works for me.

Solution 2

Looks like you installed Git in C:\Apps, so in your case the exact command will be:

"C:\Apps\Git\bin\wish.exe" "C:\Apps\Git\libexec\git-core\git-gui"

Generally, assuming installation in a default location, this is the call:

"C:\Program Files (x86)\Git\bin\wish.exe" "C:\Program Files (x86)\Git\libexec\git-core\git-gui"

Note that this answer applies to those who selected to not include git in the PATH variable during the installation process (on the screen below). If you selected the second option, then the other answer on this page (to just run "git gui") is the easier way to get to the UI from the command line.

Git PATH configuration

With 64 bit Git installed in the default location on a 64 bit Windows 10 machine, you can use the following line:

start "" "C:\Program Files\Git\mingw64\bin\wish.exe" "C:\Program Files\Git\mingw64\libexec\git-core\git-gui" "--working-dir" "<path to your Git working directory>"

If you want the Git Gui to run in the current directory, then you don't need the "--working-dir" "<path to your Git working directory>".

However, using the above mingw64\bin\wish.exe line results in some issues if Git is configured to use SSH. To have it working properly, it is necessary to change directory to the desired working directory and start git-gui.exe:

cd <working directory>
start "" "C:\Program Files\Git\cmd\git-gui.exe"

Solution 3

There is an executable that opens UI, located by default here:

C:\Program Files\Git\cmd\git-gui.exe

and in your case, apparently, here:

C:\Apps\Git\cmd\git-gui.exe

The UI can also be invoked by running generic git.exe from bin or cmd subfolders with parameter gui and with additional parameters

git gui [<command>] [arguments]

as described in the documentation.

Share:
24,581

Related videos on Youtube

user2023861
Author by

user2023861

Updated on July 09, 2022

Comments

  • user2023861
    user2023861 almost 2 years

    How do I open the Git GUI from a command window? I'm using Windows 7. I've tried running this:

    "C:\Apps\Git\libexec\git-core\git-gui"
    

    but that's not a windows script. When I right-click on a folder, I see an option that says, "Git GUI Here". When I click on that, the Git GUI opens up. I want to do the same thing from a command line.

  • Martin
    Martin over 5 years
    And to open a specific repository: git gui --working-dir C:\Projects\WorldDomination. Had to look it up in the registry since I didn’t find it in the documentation.
  • Deepak Thomas
    Deepak Thomas almost 5 years
    @Martin Thanks a ton! I wasn't finding any doc on how to open a working directory