September 13, 2012 0

merging when git conflict – setup and tools

By in GIT

Possible merge tools: kdiff3 and meld

Setup kdiff3 in git

git config --global difftool.prompt false
git config --global difftool.kdiff3.trustExitCode false
git config --global diff.tool kdiff3
git config --global mergetool.kdiff3.trustExitCode false
git config --global mergetool.keepBackup false
git config --global merge.tool kdiff3

When forming a merge command the following variables can be used (This should however not be necessary if the tool is supported by git)
$BASE = a generated file that contains the common base of the two files
$LOCAL = file containing the content on the current branch
$REMOTE = file containing the content of the file to be merged into the local branch
$MERGED = the name of the file to which the merge result should be written

Resolving conflicts after merge: git mergetool

Inspecting diffs: cpgit diff

 

Tags: , , , , , ,


Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/mgis.dk/about/wp-includes/class-wp-comment-query.php on line 399

Leave a Reply