Git Merge Use Set Default Base

286 Views Asked by At

I have two git branches. They've both been undergoing development separately. When I do a do a git mergetool to use Tortoisemerge to resolve some merge conflicts, I get this error:

Tortoisemerge cannot be used without a base.

Perhaps I'm missing something in the git docs. Nothing I've seen seems quite like what I want to do:

Perform a git merge. In the case of a normal file conflict with no BASE that git can figure out by default, just use the local version of the file as the BASE.

Is there some way to do this?

2

There are 2 best solutions below

1
UrsoBranco On

The problem could be the way you're calling tortoise merge.

Take a look at: this answer and this one

They both solve the same issue ;-)

Just in case:


create a CMD file which will launch TortoiseMerge:

TortoiseMerge.exe -base:%1 -mine:%2 -theirs:%3 -merged:%4

And set up your mergetool in .gitconfig:

[merge]
    tool = mytool
[mergetool "mytool"]
    cmd = cmd /C tortoiseMerge-git.cmd "$BASE" "$LOCAL" "$REMOTE" "$MERGED"

Cheers,

LEslie

0
display-name On

The question is wrong.

The thing that worked for me was to use a different merge tool.

People from the future: don't use tortoisemerge. Use meld if you want a gui, or vimdiff if you hate your mouse.