Skip to content

Commit

Permalink
docs: clarify what git-rebase's "-p" / "--preserve-merges" does
Browse files Browse the repository at this point in the history
Ignoring a merge can be read as ignoring the changes a merge commit
introduces altogether, as if the entire side branch the merge commit
merged was removed from the history.  But that is not what happens
if "-p" is not specified.  What happens is that the individual
commits a merge commit introduces are replayed in order, and only
any possible merge conflict resolutions or manual amendments to the
merge commit are ignored.

Get this straight in the docs.

Also, do not say that merge commits are *tried* to be recreated. As that is
true almost everywhere it is better left unsaid.

Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Sebastian Schuberth authored and Junio C Hamano committed Mar 30, 2015
1 parent 129260c commit d50d31e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Documentation/git-rebase.txt
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,9 @@ unless the `--fork-point` option is specified.

-p::
--preserve-merges::
Instead of ignoring merges, try to recreate them.
Recreate merge commits instead of flattening the history by replaying
commits a merge commit introduces. Merge conflict resolutions or manual
amendments to merge commits are not preserved.
+
This uses the `--interactive` machinery internally, but combining it
with the `--interactive` option explicitly is generally not a good
Expand Down

0 comments on commit d50d31e

Please sign in to comment.