Git Clients

mergiraf – syntax-aware Git merge conflict resolver

Mergiraf is a syntax-aware merge driver that helps reconcile changes made to the same source file by different branches. Ordinary line-based merging can report conflicts even when edits affect independent parts of a structured declaration; Mergiraf attempts to interpret the file structure before deciding whether changes conflict.

It integrates with Git merge operations and can also be run against an existing conflicted file. Its output is intended to reduce the amount of manual work needed during merges, rebases and cherry-picks, while falling back to traditional merging when structural analysis cannot safely handle a file.

Syntax-aware merging is particularly helpful when two branches add independent declarations or reorder elements that a language treats as unordered. It cannot eliminate every real conflict: competing edits to the same construct still require human judgement. Its fallback behaviour keeps it compatible with normal Git workflows.

This is free and open source software.

Key Features

  • Uses syntax-tree information to combine changes to supported programming languages and structured files.
  • Can merge independent additions and deletions inside language constructs where ordering is not significant.
  • Integrates as a Git merge driver and participates in ordinary merge, rebase and cherry-pick workflows.
  • Provides a command for attempting resolution of an already conflicted working-tree file.
  • Can show a review of its proposed structural merge alongside a conventional line-based result.
  • Falls back to line-based merging for unsupported formats or unsuitable parse results.
  • Supports embedded-language handling for relevant structured documents, including Markdown content.
  • Allows language selection and configuration of parsing-error handling when automatic detection needs adjustment.
  • Provides diagnostic reporting for reproducing unexpected merge results.
  • Can be extended to additional formats through declarative language definitions.

Website: codeberg.org/mergiraf/mergiraf
Support:
Developer: mergiraf contributors
License: GNU General Public License v3.0

mergiraf commands

mergiraf is written in Rust. Learn Rust with our recommended free books and free tutorials.


Related Software

Git Tools for Diff Review and Repository History
difftasticStructural diff tool that compares files based on their syntax
git-filter-repoQuickly rewrite git repository history
onefetchDisplays information about a local Git repository
git-statsLocal git statistics including GitHub-like contributions calendars
diff-so-fancyAttractive diffs with diff-highlight and more
BFG Repo-CleanerClean unwanted data from Git repository history
git-deltaViewer for git and diff output
gitlogueCinematic Git commit replay tool
git-quick-statsAccess various statistics in a git repository
git-whoCommand-line Git analysis tool
git-standupRecall what you did on the last working day
git-of-theseusAnalyze how a Git repo grows over time
git-sizerCompute various size metrics for a git repository
diffnavGit diff pager based on delta but with a file tree, à la GitHub
critiqueTerminal UI for reviewing git diffs
git-big-pictureVisualization tool for Git repositories
herculesGain advanced insights from Git repository history
keifuTUI that visualizes Git commit graphs
git-fameGit repository collaborators sorted by contributions
needleHighlights GitHub PRs
mergirafGit merge driver
git-historyAnalyze Git history using SQLite
ecTerminal Git mergetool
diffrWord-by-word diff highlighting utility
git-scopeFast TUI dashboard to view the git status of all your repositories
mamediffManages unstaged and staged Git diffs
deadbranchKeep Git repositories tidy
GitTopLightweight desktop client for GitHub notifications
git-heatmapGenerates a customizable heatmap

Read our verdict in the software roundup.


Best Free and Open Source Software LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.

We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more.

Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion.

Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted