LKBEN11187: Howto configure git for merging with kdiff3


This article has not been checked!

LKB | Created: 02/04/2020 | Version: 0 | Language: EN | Rating: 0 | Outdated: False | Marked for deletion: False

Author: Wim Peeters - Keskon GmbH & Co. KG


Symptom

You would like a nicer merge tool with git and a GUI

Cause

none

Solution

Merging on the command line can be difficult. A nice GUI tool like kdiff 3 will help a lot. By default kdiff3 will also try to merge lines starting with --. These are deleted lines and can be ignored. You can change this in your KDiff3 configuration. To do this add ";--" to the "command line options to ignore".

To use kdiff3 only sometimes you can use the following.

git mergetool -t kdiff3

To configure it permanently you can use:

git config --global merge.tool kdiff3

About the Author

Wim Peeters is electronics engineer with an additional master in IT and over 30 years of experience including time spent in support, development, consulting, training and database administration. Wim has worked with SQL Server since version 6.5. He has developed in C/C++, Java and C# on Windows and Linux in different European countries and different European languages. He writes knowledge base articles to solve IT problems and publishes them on the Lubby Knowledge Platform where he is one of the most important contributors and the main developer.

Disclaimer:

The information provided in this document is intended for your information only. Lubby makes no claims to the validity of this information. Use of this information is at own risk!