[英]How to change Git root directory?
When I installed git, I made a mistake to set c:/users/jack as the root directory.我在安装git的时候,把c:/users/jack设置为根目录是错误的。 But there're many unwanted folders under jack .
但是jack下有很多不需要的文件夹。 So When I open git-bash, the directory is under jack .
所以当我打开 git-bash 时,目录在jack下。 And when I open git-gui, there are thousands of unrelated files in the sidebar which I can't do anything to change it.
当我打开 git-gui 时,侧边栏中有数千个不相关的文件,我无法对其进行任何更改。 So I want to create a folder called code as the root directory of git.
所以我想创建一个名为code的文件夹作为git的根目录。 Is there any way to achieve it without uninstalling git?(btw, I'm using windows)
有什么方法可以在不卸载 git 的情况下实现它?(顺便说一句,我使用的是 Windows)
You can simply delete the c:/users/jack/.git
folder and inside your code folder, initialize git using git init
command You can simply delete the
c:/users/jack/.git
folder and inside your code folder, initialize git using git init
command
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.