-
Download DiffMerge from here. It's not the prettiest merge tool but it works.
-
Install it as usual
-
Open up a console and run the following commands:
git config --global merge.tool diffmerge git config --global mergetool.diffmerge.cmd 'diffmerge --merge --result="$MERGED" "$LOCAL" "$(if test -f "$BASE"; then echo "$BASE"; else echo "$LOCAL"; fi)" "$REMOTE"' git config --global mergetool.diffmerge.trustExitCode true
-
Check out the branch you want to merge stuff into
-
Run
git merge [other branch]
-
If you get conflicts, run
git mergetool
A quick note on terminlogy: a local branch is the currently checked out branch. A remote branch is the branch that will be merged into the local branch. For example, if I'm trying to merge
awesomeshit
intomaster
, I dogit checkout master
andgit merge awesomeshit
.master
in this case is the local branch, andawesomeshit
is the **remote.Doing a
git pull
and encountering merge conflicts, the remote source is the stuff coming down from the server (makes much more sense in this context)
The interface will open up 3 panes.
- The middle pane is the result of the merge.
- The left pane is the local file (the currently checked out branch)
- The right pane is the remote file (the file in the other branch you're trying to merge)
Find the next conflict by pressing this button:
If you want to keep your local changes, click this button:
To take the change from the remote (branch you're trying to merge), click this button:
The centre pane will show the result of the merge. When you're done, click the big ass save button and close the window. The next file in conflict state will then be opened in a new window.