如何使 git 冲突文件按所需方式排序以解决

How to make git conflicted files ordered in desired way for solving

如何使我的冲突文件按所需顺序出现以解决冲突。
例如,如果我有 2 个名为 foo 和 bar 的分支 我想将 foo 合并到 bar 中,git 给我如下冲突

CONFLICT (content): Merge conflict in x.py
CONFLICT (content): Merge conflict in z.py
CONFLICT (content): Merge conflict in y.py
Automatic merge failed; fix conflicts and then commit the result.

这里三个文件冲突,(x.py, y.py, z.py) 如果我使用命令

git mergetool --tool=meld

meld 工具将始终按字母顺序打开文件(这里是 x、y 然后是 z) 但我想解决 y、z、x 顺序的冲突。

如果有人知道解决方案或解决方法,请告诉我。

谢谢

您始终可以手动传递文件名:

git mergetool --tool=meld y.py
git mergetool --tool=meld z.py
git mergetool --tool=meld x.py