Skip to content

Direct Git Integration (Version 2.6 or older)

You want to use the best eap merging tool with the best versioning control system? Read ahead!

Using TortoiseGit? Please see TortoiseSVN Integration (Version 2.6 or older) instead (the handling of TortoiseGit and TortoiseSVN is very similar). The instructions below might conflict with TortoiseGit!

Setting up automatic merging

Windows Command Prompt & Git Bash

git config --global merge.lemontree.name "lemontree merge driver"
git config --global merge.lemontree.driver "'C:/Program Files/LieberLieber/LemonTree/LemonTree.exe' --merge=auto --base=\"%O\" --mine=\"%A\" --theirs=\"%B\" --out=\"%A\""
git config --global merge.lemontree.recursive binary

This will register lemontree as a merge driver which can automatically merge files. We still need to register it for certain types though. Make sure you are in $REPO!

Windows Command Prompt & Git Bash

echo "*.eap merge=lemontree" >> .gitattributes
echo "*.EAP merge=lemontree" >> .gitattributes
git add .gitattributes
git commit -am "added gitattributes"

That's it, lemontree is now registered as a merge driver, and configured to be used for eap files in the repository. You can now add an eap file, branch out two branches, make modifications (conflicting or otherwise) and later when merging, LemonTree will be used to merge the files.

Setting up manual merging

When you want to manually merge, or resolve conflicts later on (without using automatic merging, or when automatic merging somehow fails), you can add lemontree as a mergetool:

Windows Command Prompt

git config --global merge.tool lemontree
git config --global mergetool.lemontree.cmd "'C:/Program Files/LieberLieber/LemonTree/LemonTree.exe' --merge=auto --base=\"$BASE\" --mine=\"$LOCAL\" --theirs=\"$REMOTE\" --out=\"$MERGED\""

Git Bash

git config --global merge.tool lemontree
git config --global mergetool.lemontree.cmd "'C:/Program Files/LieberLieber/LemonTree/LemonTree.exe' --merge=auto --base=\"\$BASE\" --mine=\"\$LOCAL\" --theirs=\"\$REMOTE\" --out=\"\$MERGED\""

Now you can resolve merge conflicts with LemonTree, for example by calling "git mergetool someFile.eap" or using some other UI for git.

This configures LemonTree to be the mergetool for everything in git. It doesn't discriminate between different filetypes. You can select the mergetool used for "git mergetool" by using the -t flag: "git mergetool -t lemontree ..."

Setting up diffing

To use LemonTree as a diff tool, do the following:

Windows Command Prompt

git config --global diff.tool lemontree
git config --global difftool.lemontree.cmd "'C:/Program Files/LieberLieber/LemonTree/LemonTree.exe' --diff --base=\"$REMOTE\" --mine=\"$LOCAL\" --theirs=\"$REMOTE\""

Git Bash

git config --global diff.tool lemontree
git config --global difftool.lemontree.cmd "'C:/Program Files/LieberLieber/LemonTree/LemonTree.exe' --diff --base=\"\$REMOTE\" --mine=\"\$LOCAL\" --theirs=\"\$REMOTE\""

Now you can use LemonTree to diff two versions in your git repository.

This configures LemonTree to be the difftool for everything in git. It doesn't discriminate between different filetypes. You can select the difftool used for "git difftool" by using the -t flag: "git difftool -t lemontree ..."