【问题标题】:How to make git conflicted files ordered in desired way for solving如何使 git 冲突文件以所需的方式排序以解决
【发布时间】:2021-03-09 08:03:15
【问题描述】:

我怎样才能使我的冲突文件以所需的顺序出现以解决冲突。
例如,如果我有 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 merge-conflict-resolution git-config meld mergetool


    【解决方案1】:

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

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

    【讨论】:

      猜你喜欢
      • 2010-10-25
      • 2013-05-23
      • 2014-09-04
      • 2011-10-05
      • 2015-09-23
      • 2018-05-15
      • 1970-01-01
      • 2011-05-18
      • 1970-01-01
      相关资源
      最近更新 更多