Why was git installed in AppData instead of Program Files?

slevin picture slevin · Aug 30, 2015 · Viewed 12.8k times · Source

I installed the GitHub Desktop app in my Windows 7 from here and then restarted my laptop. I go to the Windows cmd and type git clone https://github.com/myName/myAwesomeProject.git and I get 'git' is not recognized as an internal or external command, operable program or batch file..

So I googled it and found out that I have to re-set the PATH from here. I go to the C>Program Files (x86) and there is no Git folder there. I dont know why. I searched for "Git" inside C and found it here C:\Users\nerd\AppData\Local\GitHub\PortableGit_c2ba306e536fdf878271f7fe636a147ff37326ad , I copied this to my PATH, restarted the laptop and clone now works.

My question is , why is Git installed in that location and not Program Files? Did I do something wrong? Will this cause problems in the future?

Answer

Yeh Shenhua picture Yeh Shenhua · Feb 2, 2018

Install it as administrator, by right clicking on the Git package. Then it will install to the C:\Program files\Git. Otherwise it will default to the program files folder under the user folder.