首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Git使用远程合并

Git使用远程合并
EN

Stack Overflow用户
提问于 2011-03-10 02:36:11
回答 1查看 6.6K关注 0票数 2

我一直在读Pro Git,我想我知道该怎么做了。但我之前可能在不知情的情况下做了一些奇怪的调整,也许egit在导致eclipse崩溃的时候对repo做了不完整的更改,或者我只是遗漏了什么。我现在已经放弃了egit &正在使用cmd行中的git。

我尝试从遥控器进行合并,得到以下信息:

代码语言:javascript
复制
[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]# 

让我担心的一件事是,这个遥控器应该是只读的,所以我不确定为什么会有这行:

代码语言:javascript
复制
origin  http://git.gitorious.org/opentaps/opentaps.git (push)

它还说:

代码语言:javascript
复制
Local ref configured for 'git push': master pushes to master (local out of date)

我不确定这是否与这个问题有关。我尝试删除遥控器并重新添加它们,但此配置似乎是相同的。

希望有更多经验的人能解开我的困惑。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2011-03-10 03:00:25

看起来在尝试从origin/master合并之前,你必须先做一个git fetch origin,因为不知何故,你本地的origin/master分支过时了,甚至完全搞砸了。

票数 5
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/5250504

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档