Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何更改Git根目录?_Git_Github_Gitlab - Fatal编程技术网

如何更改Git根目录?

如何更改Git根目录?,git,github,gitlab,Git,Github,Gitlab,安装git时,我犯了一个错误,将c:/users/jack设置为根目录。但是在杰克的下方有许多不需要的文件夹。因此,当我打开gitbash时,目录在jack下。当我打开GitGUI时,侧边栏中有数千个不相关的文件,我无法对其进行任何更改。因此,我想创建一个名为code的文件夹,作为git的根目录。有没有办法不用卸载git就可以实现它?(顺便说一句,我使用的是windows)你只需删除c:/users/jack/.git文件夹,然后在你的code文件夹中,使用git init命令初始化git这个问

安装git时,我犯了一个错误,将c:/users/jack设置为根目录。但是在杰克的下方有许多不需要的文件夹。因此,当我打开gitbash时,目录在jack下。当我打开GitGUI时,侧边栏中有数千个不相关的文件,我无法对其进行任何更改。因此,我想创建一个名为code的文件夹,作为git的根目录。有没有办法不用卸载git就可以实现它?(顺便说一句,我使用的是windows)

你只需删除
c:/users/jack/.git
文件夹,然后在你的code文件夹中,使用
git init
命令初始化git

这个问题的副本?谢谢你的提醒,我在问这个问题之前已经看到了。我不是很聪明,因为这和我的问题有点不同。顺便说一下,你的链接为我解决了另一个问题。