LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

kdiff3

file and directory comparison and merge tool

TLDR

Compare two files
$ kdiff3 [file1] [file2]
copy
Three-way comparison
$ kdiff3 [base] [file1] [file2]
copy
Compare directories
$ kdiff3 [dir1] [dir2]
copy
Merge with output
$ kdiff3 [base] [file1] [file2] -o [merged]
copy
Auto-select non-conflicting
$ kdiff3 [base] [file1] [file2] --auto
copy

SYNOPSIS

kdiff3 [options] [files/directories...]

DESCRIPTION

KDiff3 is a file and directory comparison and merge tool. It supports two-way and three-way comparisons, making it suitable for resolving merge conflicts and reviewing changes.KDiff3 highlights differences with colors and allows selecting which version to use for each conflict. It integrates with version control systems as a merge tool.

PARAMETERS

-o file

Output merged file.
--auto
Automatically select non-conflicting changes.
-m, --merge
Merge mode.
--cs setting=value
Configuration setting.
--qall
Quiet (auto-mode only).
-L1, -L2, -L3 label
Labels for inputs.

GIT INTEGRATION

$ # Configure as merge tool
git config --global merge.tool kdiff3
git config --global mergetool.kdiff3.path /usr/bin/kdiff3

# Configure as diff tool
git config --global diff.tool kdiff3
copy

INSTALL

sudo apt install kdiff3
copy
sudo dnf install kdiff3
copy
sudo pacman -S kdiff3
copy
sudo apk add kdiff3
copy
sudo zypper install kdiff3
copy
nix profile install nixpkgs#kdiff3
copy

CAVEATS

Requires KDE libraries. Three-way merge needs common ancestor. Large files may be slow. Binary files not compared.

HISTORY

KDiff3 was created by Joachim Eibl as a Qt/KDE application for comparing and merging files. It became a popular choice for resolving version control conflicts.

SEE ALSO

diff(1), meld(1), vimdiff(1), git-mergetool(1)

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