我创建了一个 git 存储库git init
。我想完全删除它并启动一个新的。
Git 将其所有文件保存在.git
目录。只要删除那个并再次初始化即可。
如果你找不到它,那是因为它被隐藏了。
In Windows 7, you need to go to your folder, click on Organize on the top left, then click on Folder and search options, then click on the View tab and click on the Show hidden files, folders and drives radio button.
-
在 Mac 操作系统上:
-
Open a Terminal (via Spotlight: press CMD + SPACE, type terminal
and press Enter) and run:
defaults write com.apple.finder AppleShowAllFiles 1 && killall Finder
Note: The keyboard shortcut to show hidden files in Finder is
CMD + SHIFT + . so it is no longer necessary to modify the
finder config this way
You could also type cd
(the space is important), drag and drop your git repo folder from Finder to the terminal window, press return, then type rm -fr .git
, then return again.
On Ubuntu, use shortcut Ctrl + H.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)