如何删除我在Git中添加的无效远程? [英] How do I remove an invalid remote I added in Git?

查看:123
本文介绍了如何删除我在Git中添加的无效远程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

下面是我解雇的这一行:

  git remote add Nakor git://github.com.nakor/CherryTomato.git 

我犯了一个错误,命令应该是:

  git remote add Nakor git://github.com/nakor/CherryTomato.git 

当我尝试运行第二个命令时,出现以下错误:

 致命:远程Nakor已经存在。 

这是可以理解的。如何编辑远程 Nakor 指向的端点?

>你可以使用git remote的 set-url 子命令:

  git remote set-url Nakor git://github.com/nakor/CherryTomato.git 


Here's the line I fired:

git remote add Nakor git://github.com.nakor/CherryTomato.git

I made a mistake and the command should have been:

git remote add Nakor git://github.com/nakor/CherryTomato.git

When I try to run the second command, I get this error:

fatal: Remote Nakor already exists.

Which is understandable. How can I edit the endpoint the remote Nakor is pointing to?

解决方案

you can use the set-url subcommand of git remote:

git remote set-url Nakor git://github.com/nakor/CherryTomato.git

这篇关于如何删除我在Git中添加的无效远程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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