Three-Way Comparison With diff3
See how two edited files differ from their common base.
Run diff3 mine.txt base.txt yours.txt to list conflicting and overlapping regions.
01Command
Command
$ diff3 mine.txt base.txt yours.txt02What it does
diff3 is the algorithm behind merge conflicts: it compares two versions against their ancestor and marks exactly what conflicts. Running it manually helps understand a conflicted merge and confirms that an automated resolution kept the right changes.
03Risk
!Warning: The argument order is important (mine, base, yours); reversing base and a side produces misleading output.
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- diff3.1.en.html manual page (Debian bookworm)Evidence: Documents diff3, which compares three files and marks conflicts.
Last verified: 2026-10-13 · Category: Developer