我一直在读Pro Git,我想我知道该怎么做了。但我之前可能在不知情的情况下做了一些奇怪的调整,也许egit在导致eclipse崩溃的时候对repo做了不完整的更改,或者我只是遗漏了什么。我现在已经放弃了egit &正在使用cmd行中的git。
我尝试从遥控器进行合并,得到以下信息:
[root@localhost justifventures-opentaps]# git remote -v
origin http://git.gitorious.org/opentaps/opentaps.git (fetch)
origin http://git.gitorious.org/opentaps/opentaps.git (push)
[root@localhost justifventures-opentaps]# git remote show
origin
[root@localhost justifventures-opentaps]# git remote show origin
* remote origin
Fetch URL: http://git.gitorious.org/opentaps/opentaps.git
Push URL: http://git.gitorious.org/opentaps/opentaps.git
HEAD branch: master
Remote branches:
1.5M1 new (next fetch will store in remotes/origin)
dataimport new (next fetch will store in remotes/origin)
master new (next fetch will store in remotes/origin)
upgrade-1.5 new (next fetch will store in remotes/origin)
Local ref configured for 'git push':
master pushes to master (local out of date)
[root@localhost justifventures-opentaps]# git merge origin/master
fatal: 'origin/master' does not point to a commit
[root@localhost justifventures-opentaps]# 让我担心的一件事是,这个遥控器应该是只读的,所以我不确定为什么会有这行:
origin http://git.gitorious.org/opentaps/opentaps.git (push)它还说:
Local ref configured for 'git push': master pushes to master (local out of date)我不确定这是否与这个问题有关。我尝试删除遥控器并重新添加它们,但此配置似乎是相同的。
希望有更多经验的人能解开我的困惑。
发布于 2011-03-10 03:00:25
看起来在尝试从origin/master合并之前,你必须先做一个git fetch origin,因为不知何故,你本地的origin/master分支过时了,甚至完全搞砸了。
https://stackoverflow.com/questions/5250504
复制相似问题