# Mergiraf

> A syntax-aware git merge driver for a growing collection of programming languages and file formats

Source: https://talira.ai/catalog/mergiraf-kdd3yy3b
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Command-line tool
- Categories: [developer tools / git / merge conflicts](https://talira.ai/categories/developer-tools/git/merge-conflicts)
- Platforms: macos, linux, windows, cli
- Licence: GPL-3.0-only
- Pricing: Free and open source
- Free tier: yes
- Self-hostable: yes

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.

## Links

- Website: https://mergiraf.org/

## Ways to install

### Package managers

- [Homebrew](https://talira.ai/catalog/homebrew-djy17yn9.md): <https://formulae.brew.sh/formula/mergiraf>[^1]

## 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

## Trust

Overall: 0.20 out of 1.
Signals: backing 0.00, extensibility 0.20.

Warnings:

- activity not tracked: no repository is linked

## Alternatives

- [Jujutsu (jj)](https://talira.ai/catalog/jujutsu-jj-s3nqz41c.md): A Git-compatible VCS that is both simple and powerful
- [difftastic](https://talira.ai/catalog/difftastic-64hrxm0r.md): a structural diff that understands syntax

## Sources

[^1]: https://formulae.brew.sh/api/formula.json (checked 21 Nov 2026)
