LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

mergiraf

Syntax-aware Git merge conflict resolver

TLDR

Register mergiraf as a Git merge driver
$ mergiraf register
copy
Use as a Git merge driver (configure in .gitattributes)
$ *.rs merge=mergiraf
copy
Resolve conflicts in a file manually
$ mergiraf resolve [path/to/conflicted_file]
copy
Resolve with explicit language specification
$ mergiraf resolve -L [rust] [path/to/conflicted_file]
copy
Review mergiraf's automatic resolution
$ mergiraf review [path/to/file]
copy
List supported languages
$ mergiraf languages
copy

SYNOPSIS

mergiraf command [options] [file]

DESCRIPTION

mergiraf is a syntax-aware Git merge driver that resolves merge conflicts by parsing the syntax tree of code and structured files. It supports many languages including TypeScript, Python, Java, Rust, JSON, and YAML.It operates as a drop-in driver for git merge, git rebase, and cherry-pick, but can also be run manually after a conflict. When it cannot safely auto-merge, it leaves clear conflict markers for manual review.

PARAMETERS

-L, --language LANG

Specify language by name or file extension.

SUBCOMMANDS

resolve

Attempt to resolve merge conflicts in a file.
review
Review mergiraf's automatic conflict resolution.
register
Register mergiraf as a Git merge driver in global git config.
languages
List supported languages and file extensions.
report
Generate an archive to reproduce a faulty merge.

INSTALL

sudo pacman -S mergiraf
copy
sudo apk add mergiraf
copy
sudo zypper install mergiraf
copy
brew install mergiraf
copy
nix profile install nixpkgs#mergiraf
copy

CAVEATS

Cannot resolve all conflicts — semantic conflicts that require understanding program logic still need manual resolution. Language support varies by file type. For best results, use Git v2.44.0 or newer.

HISTORY

mergiraf was created by Antonin Delpeuch and is written in Rust. The source is hosted on Codeberg.

SEE ALSO

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid