Search code examples
github-desktop

How to "Open in Git Bash" in Github Desktop


In the dropdown menu of Repository, you can see there is a button named Open in Git Bash (Ctrl + `),

enter image description here

when I click it, I got a warning saying:

Unable to locate Git

We were unable to locate Git on your system. This means you won't be able to execute any Git commands in the command prompt.

To help you get Git installed and configured for your operating system, we have some external resources available.

enter image description here

The problem is that I have already downloaded the latest Git from git-scm.com.

To conclude, how should I configure my Github Desktop or Git Bash (MingW) to make this button (Open in Git Bash) work?


Solution

  • To make Github Desktop locate Git successfully, the URI of Git must be given in environment variable %PATH%.

    I suggest to assign %GitPath% value of URI of Git, say C:\Program Files\Git\bin; then append %GitPath% to the end of %PATH%, and don't forget about path seperator (;).

    At last, restart Github Desktop after assigning the environment variables, if it is still running.

    Reference: