这是我输入的代码行:
git remote add Nakor git://github.com.nakor/CherryTomato.git
我犯了个错误,命令应该是:
git remote add Nakor git://github.com/nakor/CherryTomato.git
当我尝试运行第二条命令时,会出现以下错误:fatal: Remote Nakor already exists.
这很容易理解。我该如何编辑远程Nakor
指向的端点?
这是我输入的代码行:
git remote add Nakor git://github.com.nakor/CherryTomato.git
我犯了个错误,命令应该是:
git remote add Nakor git://github.com/nakor/CherryTomato.git
当我尝试运行第二条命令时,会出现以下错误:fatal: Remote Nakor already exists.
这很容易理解。我该如何编辑远程Nakor
指向的端点?
你可以使用 git remote 的 set-url
子命令:
git remote set-url Nakor git://github.com/nakor/CherryTomato.git
git config --edit
Under...
[remote "Nakor"]
...编辑这一行...
url = git://github.com.nakor/CherryTomato.git
来自 Github 帮助 移除远程仓库:
git remote -v
# View current remotes
origin https://github.com/OWNER/REPOSITORY.git (fetch)
origin https://github.com/OWNER/REPOSITORY.git (push)
destination https://github.com/FORKER/REPOSITORY.git (fetch)
destination https://github.com/FORKER/REPOSITORY.git (push)
git remote rm destination
# Remove remote
git remote -v
# Verify it's gone
origin https://github.com/OWNER/REPOSITORY.git (fetch)
origin https://github.com/OWNER/REPOSITORY.git (push)
git remote --help
告诉你一切。在这种情况下,使用git remote set-url ...
。
--set-url
中不应该有--
- 应该是git remote set-url Nakor git://github.com/nakor/CherryTomato.git
。 - Mark Longair