2011-03-09 58 views
2

我一直在阅读Pro Git,我想我应该怎么做。但是我之前可能会对我的忽略做出一些奇怪的调整,也许egit会对导致eclipse崩溃或者我错过某些东西的回购时间进行不完整的更改。我现在放弃使用git从cmd行上的egit &。Git使用远程合并

我试图从远程合并,我得到如下结果:

[[email protected] justifventures-opentaps]# git remote -v 
origin http://git.gitorious.org/opentaps/opentaps.git (fetch) 
origin http://git.gitorious.org/opentaps/opentaps.git (push) 
[[email protected] justifventures-opentaps]# git remote show 
origin 
[[email protected] 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) 
[[email protected] justifventures-opentaps]# git merge origin/master 
fatal: 'origin/master' does not point to a commit 
[[email protected] justifventures-opentaps]# 

一个令我担心的是,这个遥控器suppossed为只读的东西,所以我不知道为什么会有的行:

origin http://git.gitorious.org/opentaps/opentaps.git (push) 

此外,它说:

Local ref configured for 'git push': master pushes to master (local out of date) 

我不知道这有什么关系与问题。我尝试删除遥控器并再次添加它们,但此配置似乎是相同的。

希望有更多经验的人可以对我的困惑有所了解。

+0

你有没有做“git远程更新”呢? – 2011-03-09 18:39:09

+0

你能告诉我们'git branch -a'的输出吗? – nickgrim 2011-03-09 19:09:39

回答

5

看起来你必须首先执行git fetch origin,然后再尝试从origin/master合并,因为你的本地origin/master分支已经过时,甚至完全搞砸了。

+0

谢谢我得到它合并,现在我想弄清楚如何配置一个远程(推)到我的生产服务器,所以我可以推动变化,然后使用哈德森与git插件建立/部署后推。毫无疑问,这是一个新问题......如果一切都失败了 – justify 2011-03-10 09:59:01