4

Whenever I try to use git commands it says

'git' is not recognized as an internal or external command.

One of the answers at this question says I need to "add the path to your git bin folder." However, I cannot locate anything called git.bin or anything similar. I can find a folder with a git but the word bin isn't present anywhere...

Screenshot

namenotfound
  • 83
  • 2
  • 9
  • 2
    `git.exe` is what you want. Not `git.bin`. Windows command line executables end in `.exe`. In the case of a GPL program, it's sometimes in a `bin` folder, but not always. Put the path to `git.exe` in your Windows `PATH`. – lurker Jan 24 '15 at 02:24
  • actually I was wrong I have a github of type "click once application Reference" adding the file location of this to the path has not helped. – namenotfound Jan 24 '15 at 02:32
  • Right. You double click the GitHub icon, but then, what does it do? It probably calls `git.exe` and can't find it. You don't want to add the path to `GitHub` to your `PATH`. As I mentioned in my prior comment, you needto add the full directory path of `git.exe` to your `PATH`. – lurker Jan 24 '15 at 03:45
  • I can't find a git.exe anywhere – namenotfound Jan 24 '15 at 03:50
  • 1
    I'm confused. In your problem statement, you say, *I can find a folder with a `git.exe`...* If you found that folder, you need to put the full path of that folder into `PATH`. If not, you can find it with Windows 7 search in the Explorer. Open explorer, go to the top of the `C:\ ` drive, and type `git.exe`, then wait awhile for it to search. The link you gave to the other problem shows an example: `C:\Program Files (x86)\Git\bin`. Did you try going under `C:\Program Files (x86)\Git` and looking there? – lurker Jan 24 '15 at 03:52
  • i confused the "click once application Reference" for an exe if i search the c drive it doesn't find a git.exe – namenotfound Jan 24 '15 at 03:58
  • Look under `C:\Program Files (x86)` or `C:\Program Files` or `C:\` for a `Git` folder. If there isn't one, then maybe `git` wasn't installed properly. – lurker Jan 24 '15 at 04:02
  • there are no git files in either of these locations. – namenotfound Jan 24 '15 at 04:08
  • See http://stackoverflow.com/questions/11928561/where-is-git-exe-located – Jeremy Farrell Jan 24 '15 at 04:38
  • thankyou its working now. the portable git folder in the screenshot contained a bin folder and when I directed the path to it it worked. – namenotfound Jan 24 '15 at 04:53

1 Answers1

1

There is a simple sollution. You need to use "git shell" to directly use the keyword git. Github (windows) program come together with a powershell client. Just enter the keyword "git shell" in windows search. enter image description here This shortcut will open the powershell which will recognize the git command

deanpodgornik
  • 322
  • 2
  • 7