You may have noticed that git commands are not available at the command line after installing GitHub for Windows; and that it’s not immediately apparent where Git’s executable (git.exe) can be found.
On Windows, Git’s executable is actually located in:
C:\Users\<user>\AppData\Local\GitHub\PortableGit_<guid>\bin\git.exe
Once you’ve located the location of the executable, you’ll have to add it to Windows’ environment variables; namely the Path variable which lists the directories that Windows automatically searches for .exe (and other executable) binaries.
This can be done as follows:
-
Click on the Start Button
- Right click Computer or My Computer (this name will vary depending on your version of Windows)
- Click on Advanced System Settings
- Click on Environment Variables
- Then under System Variables look for the Path variable and click Edit…
- Append Git’s bin and cmd folder locations to the end of the string. You should be appending something like this:
;C:\Users\<user>\AppData\Local\GitHub\PortableGit_<guid>\cmd;C:\Users\<user>\AppData\Local\GitHub\PortableGit_<guid>\bin
NB: Be careful with syntax; in particular the use of semi-colons to separate folder location within the Path string.