@@ -9,7 +9,8 @@ git-merge-base - Find as good common ancestors as possible for a merge
99SYNOPSIS
1010--------
1111[verse]
12- 'git merge-base' [-a|--all] [--octopus] <commit> <commit>...
12+ 'git merge-base' [-a|--all] <commit> <commit>...
13+ 'git merge-base' [-a|--all] --octopus <commit>...
1314'git merge-base' --independent <commit>...
1415
1516DESCRIPTION
@@ -22,23 +23,21 @@ that does not have any better common ancestor is a 'best common
2223ancestor', i.e. a 'merge base'. Note that there can be more than one
2324merge base for a pair of commits.
2425
25- Unless `--octopus` is given, among the two commits to compute the merge
26- base from, one is specified by the first commit argument on the command
27- line; the other commit is a (possibly hypothetical) commit that is a merge
28- across all the remaining commits on the command line. As the most common
29- special case, specifying only two commits on the command line means
30- computing the merge base between the given two commits.
26+ OPERATION MODE
27+ --------------
28+
29+ As the most common special case, specifying only two commits on the
30+ command line means computing the merge base between the given two commits.
31+
32+ More generally, among the two commits to compute the merge base from,
33+ one is specified by the first commit argument on the command line;
34+ the other commit is a (possibly hypothetical) commit that is a merge
35+ across all the remaining commits on the command line.
3136
3237As a consequence, the 'merge base' is not necessarily contained in each of the
3338commit arguments if more than two commits are specified. This is different
3439from linkgit:git-show-branch[1] when used with the `--merge-base` option.
3540
36- OPTIONS
37- -------
38- -a::
39- --all::
40- Output all merge bases for the commits, instead of just one.
41-
4241--octopus::
4342 Compute the best common ancestors of all supplied commits,
4443 in preparation for an n-way merge. This mimics the behavior
@@ -51,6 +50,12 @@ OPTIONS
5150 from any other. This mimics the behavior of 'git show-branch
5251 --independent'.
5352
53+ OPTIONS
54+ -------
55+ -a::
56+ --all::
57+ Output all merge bases for the commits, instead of just one.
58+
5459DISCUSSION
5560----------
5661
@@ -89,6 +94,9 @@ and the result of `git merge-base A M` is '1'. Commit '2' is also a
8994common ancestor between 'A' and 'M', but '1' is a better common ancestor,
9095because '2' is an ancestor of '1'. Hence, '2' is not a merge base.
9196
97+ The result of `git merge-base --octopus A B C` is '2', because '2' is
98+ the best common ancestor of all commits.
99+
92100When the history involves criss-cross merges, there can be more than one
93101'best' common ancestor for two commits. For example, with this topology:
94102
0 commit comments