我提出了一个关于git pull的问题。
首先,我在“test_http_1204”分支中,
root@inception-server-Quantal:~/bosh# git branch
master
* test_http_1204
ubuntu1204
然后我使用git pull命令,但是收到了一个错误消息。
root@inception-server-Quantal:~/bosh# git pull m109bosh test_http_1204
fatal: Couldn't find remote ref test_http_1204
Unexpected end of command stream
但是,在我的远程仓库"m109bosh"中,我可以找到分支"test_http_1204"。
root@inception-server-Quantal:~/bosh# git branch -a
master
* test_http_1204
ubuntu1204
remotes/m109bosh/master
remotes/m109bosh/patch-1
remotes/m109bosh/test_http_1204
remotes/m109bosh/ubuntu1204
remotes/origin/HEAD -> origin/master
remotes/origin/floating_dns_registry
remotes/origin/http_stemcell_uploader
remotes/origin/master
remotes/origin/squashed
remotes/origin/ubuntu1204
remotes/origin/upstream
而且,.git/config的内容如下所示:
root@inception-server-Quantal:~/bosh# cat .git/config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = https://github.com/cloudfoundry-community/bosh-cloudstack-cpi.git
[branch "master"]
remote = origin
merge = refs/heads/master
[branch "ubuntu1204"]
remote = origin
merge = refs/heads/ubuntu1204
[remote "m109bosh"]
url = https://github.com/m1093782566/bosh-cloudstack-cpi.git
fetch = +refs/heads/*:refs/remotes/m109bosh/*
url = https://github.com/m1093782566/bosh.git
我猜根本原因可能是.git/config中缺少[branch "test_http_1204"],但是即使我手动添加这些行到.git/config,它仍然不起作用。
[branch "test_http_1204"]
remote = m109bosh
merge = refs/heads/test_http_1204
我对此毫无头绪。请问您能告诉我如何解决吗?谢谢!
git ls-remote m109bosh
。我认为问题在于远程m109bosh
曾经有一个test_http_1024
,但现在已经没有了。 - torekmaster
、patch-1
和ubuntu1024
。 - torek