Elektra  0.8.18
kdb-merge(1) -- Three-way merge of KeySets

kdb merge [options] ourpath theirpath basepath resultpath

DESCRIPTION

Does a three-way merge between keysets. On success the resulting keyset will be saved to mergepath. On unresolved conflicts nothing will be changed.

THREE-WAY MERGE

The kdb merge command uses a three-way merge by default. A three-way merge is when three versions of a file (or in this case, KeySet) are compared in order to automatically merge the changes made to the KeySet over time. These three versions of the KeySet are:

The three-way merge works by comparing the ours KeySet and the theirs KeySet to the base KeySet. By looking for differences in these KeySets, a new KeySet called result is created that represents a merge of these KeySets.

CONFLICTS

Conflicts occur when a Key has a different value in all three KeySets. Conflicts in a merge can be resolved using a strategy with the -s option. To interactively resolve conflicts, use the -i option.

OPTIONS

EXAMPLES

To complete a simple merge of three KeySets: kdb merge user/ours user/theirs user/base user/result

To complete a merge whilst using the ours version of the KeySet to resolve conflicts: kdb merge -s ours user/ours user/theirs user/base user/result

To complete a three-way merge and overwrite all current keys in the resultpath: kdb merge -s cut user/ours user/theirs user/base user/result

SEE ALSO