]>
Commit | Line | Data |
---|---|---|
bb73d73c JL |
1 | MERGE STRATEGIES |
2 | ---------------- | |
3 | ||
4 | resolve:: | |
5 | This can only resolve two heads (i.e. the current branch | |
6 | and another branch you pulled from) using 3-way merge | |
7 | algorithm. It tries to carefully detect criss-cross | |
8 | merge ambiguities and is considered generally safe and | |
9688a882 | 9 | fast. |
bb73d73c JL |
10 | |
11 | recursive:: | |
12 | This can only resolve two heads using 3-way merge | |
13 | algorithm. When there are more than one common | |
14 | ancestors that can be used for 3-way merge, it creates a | |
9688a882 | 15 | merged tree of the common ancestors and uses that as |
bb73d73c JL |
16 | the reference tree for the 3-way merge. This has been |
17 | reported to result in fewer merge conflicts without | |
18 | causing mis-merges by tests done on actual merge commits | |
19 | taken from Linux 2.6 kernel development history. | |
20 | Additionally this can detect and handle merges involving | |
9688a882 JH |
21 | renames. This is the default merge strategy when |
22 | pulling or merging one branch. | |
bb73d73c JL |
23 | |
24 | octopus:: | |
25 | This resolves more than two-head case, but refuses to do | |
26 | complex merge that needs manual resolution. It is | |
27 | primarily meant to be used for bundling topic branch | |
28 | heads together. This is the default merge strategy when | |
9688a882 | 29 | pulling or merging more than one branches. |
bb73d73c JL |
30 | |
31 | ours:: | |
32 | This resolves any number of heads, but the result of the | |
33 | merge is always the current branch head. It is meant to | |
34 | be used to supersede old development history of side | |
35 | branches. | |
02b00e16 MV |
36 | |
37 | subtree:: | |
38 | This is a modified recursive strategy. When merging trees A and | |
39 | B, if B corresponds to a subtree of A, B is first adjusted to | |
40 | match the tree structure of A, instead of reading the trees at | |
41 | the same level. This adjustment is also done to the common | |
42 | ancestor tree. |