Skip to content

Latest commit

 

History

History
60 lines (40 loc) · 1.7 KB

README.asciidoc

File metadata and controls

60 lines (40 loc) · 1.7 KB

kakmerge

kakmerge is a merge tool for Git that spawns instances of Kakoune within a tmux session.

When invoked, the script splits the current pane in four and displays information necessary to perform a 3-way merge (local version, remote version, ancestor and merged result).

3-way merge with kakmerge

Configuration

Place the kakmerge script into a directory of the $PATH.

Run the following commands to configure git:

git config merge.tool kakmerge
git config mergetool.kakmerge.trustExitCode true
git config mergetool.kakmerge.cmd "env LOCAL=\"\${LOCAL}\" BASE=\"\${BASE}\" REMOTE=\"\${REMOTE}\" MERGED=\"\${MERGED}\" kakmerge"

Make sure to have a look at the mergetool git configuration to fine tune it.

Testing

You can test kakmerge on a demo 3-way merge by using the test.sh script provided in this repository.

Commands

Several commands are available in a merge session, to simplify the merging process:

kakmerge-search: search for the contents of the main selection in all clients

kakmerge-abort: discard the current merge

kakmerge-done: validate the current merge

kakmerge-pick: pick a version of the code from one of the three versions of the buffer

kakmerge-next-conflict: jump to the next conflict in the merge buffer

Make sure to read the onboard documentation of the commands for more specific description of the commands.

Usermode

The kakmerge usermode is available in merge sessions, and maps to all the commands that do not take any argument (c.f. above).