如何使用命令行删除我在 Git 上的存储库?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12243619/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to delete my repository on Git using command line?
提问by Sundararajan KS
Possible Duplicate:
How to fully delete a git repository created with init?
I have a test repository on git and I want to delete it using command line. I found that
git rm <file>
deleted the files within the repository and not the repository itself. Any one can help here?
我在 git 上有一个测试存储库,我想使用命令行删除它。我发现
git rm <file>
删除了存储库中的文件而不是存储库本身。有人可以在这里帮忙吗?
回答by linquize
For local repo, run
对于本地回购,运行
rm -r .git
You may not delete a repo remotely to github via command line.
你不能通过命令行远程删除一个 repo 到 github。
回答by tback
try
尝试
rm -r .git
rm -r .git
from the root of the repository.
从存储库的根目录。