Merge branch 'tr/maint-merge-ours-clarification' (early part)
* 'tr/maint-merge-ours-clarification' (early part): rebase docs: clarify --merge and --strategy Documentation: clarify 'ours' merge strategy
This commit is contained in:
commit
c50230f751
@ -228,13 +228,23 @@ OPTIONS
|
|||||||
Use merging strategies to rebase. When the recursive (default) merge
|
Use merging strategies to rebase. When the recursive (default) merge
|
||||||
strategy is used, this allows rebase to be aware of renames on the
|
strategy is used, this allows rebase to be aware of renames on the
|
||||||
upstream side.
|
upstream side.
|
||||||
|
+
|
||||||
|
Note that a rebase merge works by replaying each commit from the working
|
||||||
|
branch on top of the <upstream> branch. Because of this, when a merge
|
||||||
|
conflict happens, the side reported as 'ours' is the so-far rebased
|
||||||
|
series, starting with <upstream>, and 'theirs' is the working branch. In
|
||||||
|
other words, the sides are swapped.
|
||||||
|
|
||||||
-s <strategy>::
|
-s <strategy>::
|
||||||
--strategy=<strategy>::
|
--strategy=<strategy>::
|
||||||
Use the given merge strategy.
|
Use the given merge strategy.
|
||||||
If there is no `-s` option, a built-in list of strategies
|
If there is no `-s` option 'git-merge-recursive' is used
|
||||||
is used instead ('git-merge-recursive' when merging a single
|
instead. This implies --merge.
|
||||||
head, 'git-merge-octopus' otherwise). This implies --merge.
|
+
|
||||||
|
Because 'git-rebase' replays each commit from the working branch
|
||||||
|
on top of the <upstream> branch using the given strategy, using
|
||||||
|
the 'ours' strategy simply discards all patches from the <branch>,
|
||||||
|
which makes little sense.
|
||||||
|
|
||||||
-q::
|
-q::
|
||||||
--quiet::
|
--quiet::
|
||||||
|
@ -29,8 +29,9 @@ octopus::
|
|||||||
pulling or merging more than one branch.
|
pulling or merging more than one branch.
|
||||||
|
|
||||||
ours::
|
ours::
|
||||||
This resolves any number of heads, but the result of the
|
This resolves any number of heads, but the resulting tree of the
|
||||||
merge is always the current branch head. It is meant to
|
merge is always that of the current branch head, effectively
|
||||||
|
ignoring all changes from all other branches. It is meant to
|
||||||
be used to supersede old development history of side
|
be used to supersede old development history of side
|
||||||
branches.
|
branches.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user