lenormf / kakmerge

A Kakoune-based mergetool for Git

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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).

About

A Kakoune-based mergetool for Git

License:The Unlicense


Languages

Language:Shell 100.0%