4

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?

Community
  • 1
  • 1
KaiserKatze
  • 1,521
  • 2
  • 20
  • 30

2 Answers2

1

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:

KaiserKatze
  • 1,521
  • 2
  • 20
  • 30
0

This happened to me today. i.e. I was getting the same warning dialog even though I had installed Git for Windows (including git bash).

I just want to point out to anyone coming across this that even though it says "Open without Git" that this is misleading. Pressing that button will open 'git bash' and it will include 'git'.

As the previous (and correct) answer explains, this dialog only comes up because it cannot find git on the path. Updating the path "only" prevents the dialog/warning from appearing.