如何找到导致特定冲突的上游提交哈希? [英] How can I find the upstream commit hash that caused a specific conflict?

查看:66
本文介绍了如何找到导致特定冲突的上游提交哈希?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在更新上游的旧功能分支,但存在很多合并冲突.就地解决冲突并不安全,因为我无法仅使用文本差异来推断实际更改.

I'm updating an old feature branch with upstream and there's lots of merge conflicts. Resolving the conflicts in-place is not safe because I cannot reason about the actual change using only the text diff.

我需要在上游分支中找到进行更改的提交,以便我可以手动将更新合并到我的分支中,同时考虑到语义差异(并找出分支的哪些其他部分需要调整).

I need to find the commit in the upstream branch that made the change so that I can incorporate the update to my branch manually, considering the semantic differences (and to figure out what other parts of the branch need an adjustment).

如何为每个冲突的块找到这样的提交?

How can I find such commit for each conflicting chunk?

推荐答案

当合并基础太久时,更改已经变成汤,您无法区分什么是什么,git imerge,它自动一步一步地从合并基础向前走,在引入冲突的对处停止一路上.它并不经常需要,但当您需要它时,它会为您做大量的笔记和笔记咨询.

When a merge base is so far back the changes have become soup and you can't separate out what's what, there's git imerge, which automates walking forward from the merge base step by step, stopping at the pairs that introduce conflicts along the way. It's not often needed, but when you need it it does a whole lot of note-taking and note-consulting for you.

这篇关于如何找到导致特定冲突的上游提交哈希?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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