git - 如何使 git 冲突文件以所需的方式排序以解决
问题描述
如何使我的冲突文件以所需的顺序出现以解决冲突。
例如,如果我有 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
推荐阅读
- django - 模型字段子集上的 DRF 字段验证
- visual-studio - F# 项目中损坏的引用
- excel - OFFSET 实际上是缓慢的还是不稳定的?
- android - 在 Firestore 上获取文档有时会返回 client.user 不能为空
- android - 是否有一个类似于 expandtile 的小部件,它允许我将标题作为单独的按钮单击?
- asp.net-core - 图分页示例
- c++ - 在数组中搜索时间
- java - Java 中的 AWS DynamoDB 分区键锁定实施
- angularjs - 在 d3 桑基图中显示实时更新
- javascript - 箭头函数在取值时表现不同的逻辑是什么?