我一直在阅读Pro Git,我想我知道应该怎么做。但是我之前可能在我的忽视中做了一些奇怪的调整,也许是因为它导致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)
我不确定这是否与问题有关。我已经尝试删除遥控器并再次添加它们但这个配置似乎是相同的。
希望有经验的人可以解释我的困惑。
答案 0 :(得分:5)
在尝试从git fetch origin
合并之前,您似乎必须首先执行origin/master
,因为某种程度上您的本地origin/master
分支已过时,甚至完全搞砸了