“不是我们可以合并的东西”出现? [英] How does "not something we can merge" arise?

查看:262
本文介绍了“不是我们可以合并的东西”出现?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这对我来说是新的。我是一个经验丰富的git用户,并且刚刚添加了一个远程服务器,用于从我的分支中获取更新,然后尝试将它们合并到:

  $ git的合并HEAD f6ff240dbf47234249a68b34c8a98bb11237aa7 
致命:f6ff240dbf47234249a68b34c8a98bb11237aa7 - 不是我们可以合并

网络上几乎没有关于这个错误信息,这让我很震惊。我能找到的最近的东西是这个网页关于在一个独立的头部状态。但是 git status 报告我在分支主机上。



您可以看到我正在尝试使用的存储库github - 我的回购远程我想从中拉出来。在写这篇文章的时候,我的回购的主人是在 6dc048862a93ffba6cd37883fd43e40651f248c1



查看历史记录,我可以看到叉在哪里发生分歧,并且我正在尝试合并来自3次提交的提交。这似乎并不困难。



要自己复制,您可以这样做:

  git clone https://github.com/aptivate/dye 
cd dye
git remote add qris git://github.com/qris/ping-dye.git
GIT中取qris
GIT中结帐主
GIT中合并f6ff240dbf47234249a68b34c8a98bb11237aa7


解决方案



我只是意识到你的意思是 3f6ff240dbf47234249a68b34c8a98bb11237aa7 (注意失踪 3 开头)刚去提交列表中,然后键入<大骨节病>控制 + f f6ff



如果那是你认识的人,告诉他们总是分支从 master 并在那里提交它们的自定义更改(对于每个更改),而不是直接提交到。然后,他不需要重新绑定并强制推送来自上游的更改(您),而只需合并具体的故事分支。


This is a new one to me. I'm a fairly experienced user of git, and have just added a remote to a repo that was forked from mine, fetched the updates and then tried to merge them in:

$ git merge HEAD f6ff240dbf47234249a68b34c8a98bb11237aa7
fatal: f6ff240dbf47234249a68b34c8a98bb11237aa7 - not something we can merge

There is next to nothing on the web about this error message, which shocks me. The nearest thing I can find is this page about being in a detached head state. But git status reports that I am on branch master.

You can see the repositories I am trying to use on github - my repo and the remote I want to pull from. At the time of writing, master of my repo is at 6dc048862a93ffba6cd37883fd43e40651f248c1.

Looking at the history I can see where the forks diverge, and I am trying to merge a commit from 3 commits up the fork. It doesn't seem that hard.

To replicate for yourself you could do:

git clone https://github.com/aptivate/dye
cd dye
git remote add qris git://github.com/qris/ping-dye.git
git fetch qris
git checkout master
git merge f6ff240dbf47234249a68b34c8a98bb11237aa7

解决方案

It's quite simple: f6ff240dbf47234249a68b34c8a98bb11237aa7 doesn't exist.

I just realize you mean 3f6ff240dbf47234249a68b34c8a98bb11237aa7 (Note the missing 3 at the beginning) Just go to the commit list and type Ctrl+f f6ff.

If that is someone you know, you should tell them to always branch from master and commit their custom changes there (for every change), instead of committing directly into master. Then he doesn't need to rebase and force-push the changes from upstream (you) and you only have to merge the specific story-branches.

这篇关于“不是我们可以合并的东西”出现?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆