Git主目录 [英] Git master home directory

查看:115
本文介绍了Git主目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不小心将主目录设置为主目录.我该如何撤消呢?

I've accidentally made my home directory the master. How do I undo this?

注意:现在每次打开终端时,它都会声明我的主目录为(主目录).我不希望我的主目录位于github中,而只是几个子文件夹.

Note: every time I open up terminal now it declares that my home directory is (master). I don't want my home directory in github, just a few subfolders.

谢谢!

推荐答案

您可以删除隐藏在主目录中的git目录.在终端中输入以下内容:

You can remove the git directory that is hidden inside of your home directory. In the terminal enter the following:

cd ~
sudo rm -R .git

注意:这将删除您家庭目录中的所有GIT历史.这不会删除您的主目录中的任何文件,但会从您的主目录中删除git跟踪,这是我认为您要执行的操作.

Note: THIS WILL REMOVE ANY GIT HISTORY FOR YOUR HOME DIRECTORY. This will not remove any files in your home directory but it will remove git tracking from your home directory which is what I assume you want to do.

这篇关于Git主目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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