How do I install Git in my PATH
when using the GitHub client for Windows?
I'm running into errors because apparently Git is not installed in PATH. For example, using Atom, trying to install the Linter plugin gives this error:
npm ERR! not found: git
npm ERR!
npm ERR! Failed using git.
npm ERR! This is most likely not a problem with npm itself.
npm ERR! Please check if you have git installed and in your PATH.
Does GitHub for Windows install Git when it installs? (It must, otherwise how does it use Git?) I don't want to double-install it... so how do I just add the Git that's already there to PATH?
I installed GitHubDesktop on Windows 10 and git.exe is located there: C:\Users\john\AppData\Local\GitHubDesktop\app-0.7.2\resources\app\git\cmd\git.exe
Thanks everyone who have answered.I have seen all answers and to try to make it easy for everyone
Step 1: Type edit environment and select the option shown
Step 2: Select Path and click on edit
Step 3: In the end add the below statement(you can avoid the first ; if its already there)
Step 4:- Click on ok
Step 5 :- One of the important step which is highlighted by one of the user. thanks to him
**
**
Here is the magic
If you use SmartGit on Windows, the executable might be here:
I would like to add one more thing to what the other answers have said. It is not compulsory that path will be:
C:\Users\<user>\AppData\Local\GitHub\PortableGit_<guid>\bin\git.exe
In my computer I did not found
Git
there.BUT git and cmd are located in
git.exe
cmd
To add into PATH:
Add the path to git’s bin and cmd at the end of the string like this:
;C:\Program Files\Git\bin\git.exe;C:\Program Files\Git\cmd
OR
;C:\Users\<user>\AppData\Local\GitHub\PortableGit_<guid>\bin;C:\Users\<user>\AppData\Local\GitHub\PortableGit_<guid>\cmd
To verify, restart cmd and type
git --version
in cmdGit’s executable is actually located in:
C:\Users\<user>\AppData\Local\GitHub\PortableGit_<guid>\bin\git.exe
Now that we have located the executable all we have to do is add it to our PATH:
;C:\Users\<user>\AppData\Local\GitHub\PortableGit_<guid>\bin;C:\Users\<user>\AppData\Local\GitHub\PortableGit_<guid>\cmd