.TH "md_doc_help_elektra-merge-strategy" 3elektra "Sun May 29 2016" "Version 0.8.14" "Elektra" \" -*- nroff -*- .ad l .nh .SH NAME md_doc_help_elektra-merge-strategy \- elektra-merge-strategies(7) -- how to merge key sets In elektra-tools a three way merging was implemented\&. It can also use be used for two way merging, e\&.g\&. for importing\&. .PP Note: For a two-way merge, the \fCours\fP version of the keys is used in place of \fCbase\fP .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 "STRATEGIES" .PP Currently the following strategies exist: .PP .IP "\(bu" 2 preserve: Automerge only those keys where just one side deviates from base (default)\&. .IP "\(bu" 2 ours: Whenever a conflict exists, use our version\&. .IP "\(bu" 2 theirs: Whenever a conflict exists, use their version\&. .IP "\(bu" 2 cut: Removes existing keys below the resultpath and replaces them with the merged keyset\&. .IP "\(bu" 2 import: Preserves existing keys in the resultpath if they do not exist in the merged keyset\&. If the key does exist in the merged keyset, it will be overwritten\&. (avoid using it) .PP