为什么在AppData中而不是在程序文件中安装了git? [英] Why was git installed in AppData instead of Program Files?

查看:121
本文介绍了为什么在AppData中而不是在程序文件中安装了git?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从此处安装了GitHub Desktop应用程序,然后重新启动了笔记本电脑。我转到Windows cmd并键入 git clone https://github.com/myName/myAwesomeProject.git ,我却得到'git'不是

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..

因此,我用Google搜索了一下,发现我必须重新从此处设置 。我转到 C>程序文件(x86),那里没有Git文件夹。我不知道为什么。我在C中搜索了 Git,并在这里找到它: C:\Users\nerd\AppData\Local\GitHub\PortableGit_c2ba306e536fdf878271f7fe636a147ff37326ad ,我将其复制到了我的PATH,重新启动笔记本电脑,克隆现在可以使用了。

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.

我的问题是,为什么Git安装在该位置而不是Program Files?我做错什么了吗?

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?

推荐答案

以管理员身份通过右键单击Git软件包安装它。然后它将安装到 C:\Program文件\Git 。否则,它将默认为用户文件夹下的program files文件夹。

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.

这篇关于为什么在AppData中而不是在程序文件中安装了git?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆