gitmerge-conflict-resolutiongit-configmeldmergetool

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


How can I make my conflicted files to come in desired order to resolve conflicts.
e.g if I have 2 branches named foo and bar i want to merge foo into bar and git gives me conflicts as below

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.

here three files are conflicted, (x.py, y.py, z.py) if i use command

git mergetool --tool=meld

meld tool will open a file always in alphabetical order ( here x, y then z) but i want to resolve conflict in the y, z, x order.

Please let me know if anyone knows the solution or workaround.

Thanks


Solution

  • You can always pass the file names manually:

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