git-mediate

Tool to help resolving git conflicts

https://github.com/Peaker/git-mediate

Version on this page:1.0.8.1
LTS Haskell 23.22:1.1.0
Stackage Nightly 2025-05-15:1.1.0
Latest on Hackage:1.1.0

See all snapshots git-mediate appears in

GPL-2.0-only licensed by Eyal Lotem
Maintained by [email protected]
This version can be pinned in stack with:git-mediate-1.0.8.1@sha256:5d98c38bc1dbb50f4a73f0298eb76d1d74e7e47821ff50b79d8679249b8dc2fe,3541

Module documentation for 1.0.8.1

There are no documented modules for this package.

Git conflict resolution has never been easier

When encountering a conflict, you can sometimes imagine: if only I could have applied one of these patches BEFORE the other rather than concurrently, I wouldn't be in this mess!

Well, with git-mediate, you can!

In any conflicted state - git-mediate shows you the 2 diffs involved. By applying these diffs to the base version and the other version, you emulate the situation where the patch had already existed when the other had been applied.

Reapply git-mediate, it will validate that you've indeed applied it correctly, and bam: conflict disappeared!

Git-mediate also lets you handle modify/delete conflicts (there's no sane way in git to show what the modification actually was)

Git-mediate also streamlines jumping to the conflicts with your editor, either with the `-e` option to invoke your editor, or via the standard line number format, which is parsed by all major editors, to allow use of "jump to next error" keys.

Git-mediate especially shines with automatic source transformation tools such as renamers.

In a conflicted state, re-apply a rename that caused the conflict, run git-mediate without opening any files, and the conflicts are gone!

Changes

Since 1.0.7

  • Fix stack.yaml to use Diff 0.4 as well

Since 1.0.6

  • Upgrade Diff dependency to 0.4

Since 1.0.5

  • Allow merging a specific file

  • Reduce add/add conflicts with matching prefix/suffix lines

  • Add support for --untabify