如何使用命令行删除我在 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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 14:31:05  来源:igfitidea点击:

How to delete my repository on Git using command line?

gitgithubrepository

提问by Sundararajan KS

Possible Duplicate:
How to fully delete a git repository created with init?

可能的重复:
如何完全删除使用 init 创建的 git 存储库?

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.

从存储库的根目录。