3

I installed GitHub Desktop, but it doesn't seem to have successfully set up the git command on the command line. When I try to call git, cmd gives me the error,

'git' is not recognized as an internal or external command, operable program or batch file.

The following path was added to my environment variables; is there some way I should edit this to make git work in cmd?

C:\Users\Me\AppData\Local\GitHubDesktop\bin
Kevin
  • 1,126
  • 2
  • 12
  • 21

1 Answers1

0

Find the git.exe file using WHERE git. This is the directory that should be added to your PATH environment variable.

WHERE git

Mine is in C:\Program Files\Git\cmd\git.exe.

I have C:\Program Files\Git\cmd added to the PATH environment variable.

lit
  • 13,209
  • 9
  • 55
  • 92
  • 1
    'INFO: Could not find files for the given pattern(s)." Doesn't look like I have git.exe installed. – Kevin Nov 12 '17 at 21:56
  • 1
    Please look under `C:\Program Files` and `C:\Program Files (x86)`. – lit Nov 12 '17 at 21:59
  • 1
    I don't have it in either of those directories. – Kevin Nov 12 '17 at 22:03
  • 1
    Perhaps you do need to install it. – lit Nov 12 '17 at 22:05
  • 1
    It turns out Github Desktop doesn't come with the command line configuration, as it is separate from Git. I just had to separately install git for windows to make it work. – Kevin Nov 12 '17 at 22:10
  • GitHub Desktop does come with its own git executable; see https://stackoverflow.com/a/46966548/1843329 . I've never tried using that executable directly from the command line myself, but it might work without you having to download Git for Windows separately. – snark Aug 08 '19 at 13:20