What should I do when I get "TortoiseMerge cannot be used without a base"?

4.6k views Asked by At

I use msysgit on my windows machine for Git. I have TortoiseGit installed mainly because I like TortoiseMerge and the log feature. Most of the time, when I use git mergetool to resolve merge conflicts, TortoiseMerge opens normally and lets me merge. Sometimes, I get "TortoiseMerge cannot be used without a base". I think that means that the file mentioned needs to be opened in a text editor to be manually merged. What's the most efficient way to respond to the "TortoiseMerge cannot be used without a base" error/message?

2

There are 2 answers

0
alain.janinm On

Got this issue and kdiff3 didn't work either.

I finally used Tortoise. In you global .gitconfig

[merge]
    tool = tortoise
[mergetool "tortoise"]
    cmd = "/c/Program\\ Files/TortoiseSVN/bin/TortoiseMerge.exe" -base:"$BASE" -theirs:"$REMOTE" -mine:"$LOCAL" -merged:"$MERGED"

Above config use my old Tortoise SVN (not GIT). I suggest to new users to download TortoiseGit and use this config :

[mergetool "tortoise"]
    cmd = "/c/Program\\ Files/TortoiseGit/bin/TortoiseGitMerge.exe" -base:"$BASE" -theirs:"$REMOTE" -mine:"$LOCAL" -merged:"$MERGED"

After configs are updated, if you're using Git Bash, restart the terminal. Also you may have to call git config merge.tool tortoisemerge if not already done.

0
Gaz M On

This message happens whenever there's no base file (i.e. the file didn't exist in the tree at the last common ancestor between both branches). TortoiseMerge can't handle three-way merges where there isn't a base.

Your best bet would be to use a different tool. I personally use kdiff3, which handles this specific case without a problem, but there are others out there.