A syntax-aware git merge driver for a growing collection of programming languages and file formats
open sourceGPL-3.0-onlyself-hostablefree
Mergiraf is a merge driver that understands the syntax trees of files, so it can often reconcile changes from both sides when git's line-based merge reports a conflict. It returns git's result when that is conflict-free and otherwise attempts a structured merge. It can be configured as git's merge driver (affecting merge, rebase, revert and cherry-pick) or run manually after a conflict.
Ways to install
Package managers
Problems it solves
- git reports a conflict when two people added different imports at the top of the same file
- rebases keep stopping on conflicts that are obviously trivial to combine
- automatically resolve merge conflicts that only look like conflicts line by line
- two branches added entries to the same JSON or YAML list and git cannot merge them
- parallel AI agents keep generating merge conflicts in the same files
- need a smarter merge that understands code structure
- resolve conflicts after the fact with a tool instead of by hand
- cherry-picks across branches conflict on unrelated adjacent edits
Features
- syntax-aware merging
- git merge driver
- manual conflict-solving mode
- many languages and formats
Capabilities
| Has a command line tool | plan not known |
|---|
Alternatives
The same job
These do what Mergiraf does.
- Jujutsu (jj) A Git-compatible VCS that is both simple and powerful
- difftastic a structural diff that understands syntax