a tool used to resolve merge conflicts identified by source control systems like git, Mercurial, or Subversion/svn, such as kdiff3
Questions tagged [mergetool]
155 questions
13
votes
2 answers
Can I rename LOCAL, REMOTE and BASE as used in git mergetool?
Lets say I'm doing a rebase B of a branch onto master and there's a conflict. git opens up the default merge tool with 3 files as input : file.LOCAL, file.BASE, file.REMOTE (they're named a little differently, but LOCAL, BASE and REMOTE are in the…

Carl
- 43,122
- 10
- 80
- 104
13
votes
3 answers
git tells me that I Merge conflict, but also tells me that no files need merging
I committed some changes in the branch new.
I checkout out to master.
When I tried to merge:
$ git merge new
Auto-merging js/site.js
CONFLICT (content): Merge conflict in js/site.js
Automatic merge failed; fix conflicts and then commit the…

Trufa
- 39,971
- 43
- 126
- 190
11
votes
3 answers
How to select the entire REMOTE file during mergetool?
I'm using CLI mergetool vimdiff and rather than going line by line and typing :diffg RE for every change to select the REMOTE version, is there a way I can just have the REMOTE version of the entire file as the target merge?

jsstuball
- 4,104
- 7
- 33
- 63
11
votes
3 answers
Using IntelliJ as git mergetool always exits as soon as soon as it starts
I have configured IntelliJ as my diff and mergetool on my mac, but the git launches it, the command line always returns immediately, rather than waiting for the diff to be completed, which means that the changes enacted are not reflected on disk.
My…

Arne Claassen
- 14,088
- 5
- 67
- 106
10
votes
2 answers
What are the various "vimdiff" difftools/mergetools?
When I run git difftool --tool-help or git mergetool --tool-help, I see:
vimdiff
vimdiff1
vimdiff2
vimdiff3
What are these different "versions"? I assume they all start Vim with different options, but what are the options? Are they documented…

shadowtalker
- 12,529
- 3
- 53
- 96
10
votes
2 answers
Git: Confusion about merge algorithm, conflict format, and interplay with mergetools
I don't know the details, but as far as I understand the process of merging and conflict resolution, it goes as follows (assume there is only one file in the repository, modified in two branches):
The user issues a git merge command.
Git applies…

domin
- 1,192
- 1
- 7
- 28
10
votes
3 answers
p4merge and Git 1.8.3
How can I config git to use p4merge as my mergetool?
Next is my current situation:
$ git --version
git version 1.8.3.msysgit.0
$ git mergetool
This message is displayed because 'merge.tool' is not configured.
See 'git mergetool --tool-help' or…

Mahmoud Samy
- 2,822
- 7
- 34
- 78
10
votes
2 answers
gvimdiff mergetool for msysgit
I'm trying to use gvimdiff as a mergetool for git on Windows. Previously I've used vimdiff in console mode, but know feel like I'm not happy with limiting view Windows console size, so I'm trying to switch to gvimdiff which have more flexible…

shytikov
- 9,155
- 8
- 56
- 103
7
votes
1 answer
Git: configure patterns for difftool and mergetool
In Mercurial, one can define a pattern for external diff and merge tools (so that they are called only for files matching the pattern specified):
[diff-patterns]
**.ext = difftool
[merge-patterns]
**.ext = mergetool
How to define such patterns in…

utapyngo
- 6,946
- 3
- 44
- 65
7
votes
2 answers
Configure git mergetool with Sublimerge
I configured my git to resolve merge conflicts with Sublimerge.
For this, I was run:
git config --global merge.tool sublimerge
git config --global mergetool.sublimerge.cmd 'subl -n --wait \"$REMOTE\" \"$BASE\" \"$LOCAL\" \"$MERGED\" --command…

Mr-Cutia
- 83
- 1
- 5
7
votes
4 answers
How to skip "Hit return to start merge resolution tool" and open mergetool automatically
Git asking to hit return button to open the mergetool for each conflict file one by one:
> git mergetool
Normal merge conflict for '...':
{local}: modified file
{remote}: modified file
Hit return to start merge resolution tool (opendiff):
How…

erkfel
- 1,588
- 2
- 17
- 29
7
votes
2 answers
How can I see the list of available merge tools for git on the command line?
I am using git on a virtual machine Ubuntu server running command-line only and I don't know vim (and frankly I don't really want to learn it right now) so I don't want to use vimdiff. How can I get the list of available merge tools for git?
Bonus…

Technoh
- 1,606
- 15
- 34
6
votes
2 answers
How to solve the problem that KDiff adds extra blank lines when resolving merge conflicts?
How to solve the problem that KDiff adds extra blank lines when resolving merge conflicts?
Changing the end line and encoding in the settings to any others does not help.
If before running git mergetool we have:
line1
line2
line3
then after…

LANSELOT
- 185
- 2
- 9
6
votes
1 answer
Cannot use `git mergetool` with `git am` or `git apply` or `patch`
git mergetool is wonderful (in my case, I use kdiff3). However, it is not possible to use it to resolve conflicts from git am or git apply (or even with patch command). Indeed, mergetool need 3 files to work (base and both modified versions) while…

Jérôme Pouiller
- 9,249
- 5
- 39
- 47
6
votes
2 answers
Windows Subsystem for Linux git mergetool meld UnicodeDecodeError
I'm WSL (Windows Subsystem for Linux) user.
I use WSL to simply rsync source code between my host and remote compiling machine (RedHat). I found such a article:…

Sebastian
- 330
- 4
- 9