[英]Git working with remote merges
我一直在阅读Pro Git,我想我该怎么做。 但是我之前可能对我的忽略做了一些怪异的调整,也许例如,它对回购协议做出了不完整的更改,这是导致月食崩溃的原因之一,或者我只是错过了一些东西。 我现在已经放弃了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)
我不确定这是否与问题有关。 我尝试删除遥控器并再次添加它们,但是此配置似乎相同。
希望有更多经验的人可以阐明我的困惑。
看起来您必须先执行git fetch origin
然后再尝试从origin/master
进行合并,因为不知何故,您的本地origin/master
分支已经过时,甚至完全被搞砸了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.