Skip to content

Commit d50d31e

Browse files
sschuberthgitster
authored andcommitted
docs: clarify what git-rebase's "-p" / "--preserve-merges" does
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 129260c commit d50d31e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Documentation/git-rebase.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,9 @@ unless the `--fork-point` option is specified.
358358

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

0 commit comments

Comments
 (0)