Skip to content

Instantly share code, notes, and snippets.

@JeffMill
Last active November 2, 2024 12:57
Show Gist options
  • Save JeffMill/748fc20917cba066dde41ce8725332d6 to your computer and use it in GitHub Desktop.
Save JeffMill/748fc20917cba066dde41ce8725332d6 to your computer and use it in GitHub Desktop.
kdiff3 configuration for Windows

KDiff3

Fast on Linux and Windows, and supports 3-way merging! Diffinity and Meld are a couple of other viable options.

KDiff3 Merge Tutorial

Install KDiff3

winget install KDE.KDiff3

Set recommended settings

@'
[KDiff3 Options]
ApplicationFont=Segoe UI,9,-1,5,50,0,0,0,0,0
CreateBakFiles=false
EncodingForA=UTF-8
EncodingForB=UTF-8
EncodingForC=UTF-8
EncodingForOutput=UTF-8
EncodingForPP=UTF-8
EscapeKeyQuits=true
Font=Cascadia Code,10,-1,5,50,0,0,0,0,0
ReplaceTabs=true
ShowLineNumbers=true
ShowWhiteSpace=true
ShowWhiteSpaceCharacters=false
SkipDirStatus=true
TabSize=4
UnfoldSubdirs=true
'@ | Out-File -Encoding ascii "$env:LocalAppData/kdiff3rc"

Configure git

git config --global --edit  
[diff]
	tool = kdiff3
[difftool]
	keepBackup = false
	prompt = false
	trustExitCode = false
[difftool "kdiff3"]
	path = C:/Users/jeffmill/AppData/Local/KDiff3/bin/kdiff3.exe
[merge]
	tool = kdiff3
[mergetool]
	keepBackup = false
	prompt = false
	trustExitCode = false
[mergetool "kdiff3"]
	path = C:/Users/jeffmill/AppData/Local/KDiff3/bin/kdiff3.exe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment