.TH "md_doc_help_kdb-merge" 3elektra "Sun May 29 2016" "Version 0.8.14" "Elektra" \" -*- nroff -*- .ad l .nh .SH NAME md_doc_help_kdb-merge \- kdb-merge(1) -- Three-way merge of KeySets \fCkdb merge [options] ourpath theirpath basepath resultpath\fP .PP .IP "\(bu" 2 ourpath: Path to the keyset to serve as \fCours\fP .IP "\(bu" 2 theirpath: path to the keyset to serve as \fCtheirs\fP .IP "\(bu" 2 basepath: path to the \fCbase\fP keyset .IP "\(bu" 2 resultpath: path without keys where the merged keyset will be saved .PP .PP .SS "DESCRIPTION" .PP Does a three-way merge between keysets\&. On success the resulting keyset will be saved to mergepath\&. On unresolved conflicts nothing will be changed\&. .PP .SS "THREE-WAY MERGE" .PP The \fCkdb merge\fP 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: .PP .IP "\(bu" 2 \fCbase\fP: The \fCbase\fP KeySet is the original version of the KeySet\&. .IP "\(bu" 2 \fCours\fP: The \fCours\fP KeySet represents the user's current version of the KeySet\&. This KeySet differs from \fCbase\fP for every key you changed\&. .IP "\(bu" 2 \fCtheirs\fP: The \fCtheirs\fP KeySet usually represents the default version of a KeySet (usually the package maintainer's version)\&. This KeySet differs from \fCbase\fP for every key someone has changed\&. .PP .PP The three-way merge works by comparing the \fCours\fP KeySet and the \fCtheirs\fP KeySet to the \fCbase\fP KeySet\&. By looking for differences in these KeySets, a new KeySet called \fCresult\fP is created that represents a merge of these KeySets\&. .PP .SS "CONFLICTS" .PP Conflicts occur when a Key has a different value in all three KeySets\&. Conflicts in a merge can be resolved using a \fCstrategy\fP with the \fC-s\fP option\&. To interactively resolve conflicts, use the \fC-i\fP option\&. .PP .SS "OPTIONS" .PP .IP "\(bu" 2 \fC-H\fP, \fC--help\fP: Show the man page\&. .IP "\(bu" 2 \fC-V\fP, \fC--version\fP: Print version info\&. .IP "\(bu" 2 \fCs\fP, \fC--strategy \fP: Specify which strategy should be used to resolve conflicts\&. .IP "\(bu" 2 \fC-v\fP, \fC--verbose\fP: Explain what is happening\&. .IP "\(bu" 2 \fC-i\fP, \fC--interactive\fP Interactively resolve the conflicts\&. .PP .PP .SS "EXAMPLES" .PP To complete a simple merge of three KeySets: \fCkdb merge user/ours user/theirs user/base user/result\fP .PP To complete a merge whilst using the \fCours\fP version of the KeySet to resolve conflicts: \fCkdb merge -s ours user/ours user/theirs user/base user/result\fP .PP To complete a three-way merge and overwrite all current keys in the \fCresultpath\fP: \fCkdb merge -s cut user/ours user/theirs user/base user/result\fP .PP .SS "SEE ALSO" .PP .IP "\(bu" 2 \fBelektra-merge-strategies(7)\fP .PP