Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding Git to PATH Variable - Can't find GitHub under AppData/Local

Tags:

I was following this guide here on how to add Git to my Path variable so I can use it from the command line (Not just Git Bash).

Installing Git in PATH with GitHub client for Windows

To quote an answer, Git was supposedly located here

Get the Git URL

We need to get the url of the Git \cmd directory your computer. Git is located here:

C:\Users\\AppData\Local\GitHub\PortableGit_\bin\git.exe

I opened File Explorer and went to the directory C:\Users\AppData\Local\

Under the view tab, I have Hidden Items checked. I cannot see a GitHub folder listed. In the search bar, I appended GitHub to the end of the directory path and got the following message

Windows can't find 'C:\Users\username\AppData\Local\GitHub'. Check the spelling and try again. 

I'm trying to add Git to my environment path variable, but can't find where git is located.

In Git Bash, I was able to try which git where I got /bin/git

But I'm not sure how I can find what to put in under environment variable.

Doing a random search, I actually found that the Git folder was located here

C:\ProgramFiles(x86)\Git 

But what am I supposed to enter for the path variable? This is different from the answer in the other question.

like image 440
Richard Hamilton Avatar asked Jul 01 '15 16:07

Richard Hamilton


People also ask

How do I find my git path?

2 Answers. Git executable can be found by using running git --exec-path, which usually lives in the Git execution path. git --exec-path will give you the path.

Do we need to set path for Git?

Git executable files are located in the C:\Program Files\Git\bin\git.exe and C:\Program Files\Git\cmd . These directories must be added to the PATH environment variable to run the program.

Where does git look for its subprograms?

GIT_EXEC_PATH determines where Git looks for its sub-programs (like git-commit , git-diff , and others). You can check the current setting by running git --exec-path .


1 Answers

Just add the path to the command. This was the path to add to the end of the windows PATH.

C:\Program Files\Git\bin\ 

Now we should be able to find git.exe by typing

git 
like image 114
Ben Paz Avatar answered Oct 20 '22 09:10

Ben Paz