【发布时间】:2014-02-07 08:42:45
【问题描述】:
有人可以解释为什么 git remote origin 不能从 livepost.git 更改为 Europeanexplorer.git 吗?我尝试按照说明进行操作,但文档指出 error: Could not remove config section 'remote.origin' 表示该文件不存在,这显然不是这里的情况。
$ git remote -v
origin https://github.com/harrisongill/livepost.git (fetch)
origin https://github.com/harrisongill/livepost.git (push)
$ git remote rm origin
error: Could not remove config section 'remote.origin'
$ git remote set-url origin https://github.com/harrisongill/europeanexplorer.git
$ git remote -v
origin https://github.com/harrisongill/livepost.git (fetch)
origin https://github.com/harrisongill/livepost.git (push)
origin https://github.com/harrisongill/europeanexplorer.git (push)
$ git remote rm origin
$ git remote -v
origin https://github.com/harrisongill/livepost.git (fetch)
origin https://github.com/harrisongill/livepost.git (push)
编辑:添加 git 配置
$git config --list
Harrisons-MacBook-Pro:European Explorer harrison$ git config --list
user.name=Harrison Gill
user.email=my email
remote.origin.url=https://github.com/harrisongill/livepost.git
core.repositoryformatversion=0
core.filemode=true
core.logallrefupdates=true
core.precomposeunicode=true
【问题讨论】:
-
这很不寻常。请发布您的
.git/config的[remote "origin"]部分。
标签: git