Git如何删除远程仓库

Git如何删除远程仓库?本篇文章为大家讲解一下Git删除远程仓库方法, 有需要的小伙伴可以参考一下。

Git如何删除远程仓库插图

删除远程仓库你可以使用命令:

git remote rm [别名]

实例

$ git remote -v
origin    [email protected]:tianqixin/runoob-git-test.git (fetch)
origin    [email protected]:tianqixin/runoob-git-test.git (push)

# 添加仓库 origin2
$ git remote add origin2 [email protected]:tianqixin/runoob-git-test.git

$ git remote -v
origin    [email protected]:tianqixin/runoob-git-test.git (fetch)
origin    [email protected]:tianqixin/runoob-git-test.git (push)
origin2    [email protected]:tianqixin/runoob-git-test.git (fetch)
origin2    [email protected]:tianqixin/runoob-git-test.git (push)

# 删除仓库 origin2
$ git remote rm origin2
$ git remote -v
origin    [email protected]:tianqixin/runoob-git-test.git (fetch)
origin    [email protected]:tianqixin/runoob-git-test.git (push)
THE END