X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=Documentation%2Fgit-rebase.txt;h=96907d48632be36d0d8c66f6a0b4d937b7a38cb6;hb=c576304d512df18fa30b91bb3ac15478d5d4dfb1;hp=2e3363a61767c4757fdf591f36dc4ce5a2c35982;hpb=1b1dce4bae760248a1fc3e29548a72c446e77270;p=git.git diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt index 2e3363a61..96907d486 100644 --- a/Documentation/git-rebase.txt +++ b/Documentation/git-rebase.txt @@ -9,7 +9,7 @@ SYNOPSIS -------- [verse] 'git-rebase' [-i | --interactive] [-v | --verbose] [--merge] [-C] - [--onto ] [] + [-p | --preserve-merges] [--onto ] [] 'git-rebase' --continue | --skip | --abort DESCRIPTION @@ -213,6 +213,10 @@ OPTIONS Make a list of the commits which are about to be rebased. Let the user edit that list before rebasing. +-p, \--preserve-merges:: + Instead of ignoring merges, try to recreate them. This option + only works in interactive mode. + include::merge-strategies.txt[] NOTES @@ -304,6 +308,23 @@ $ git rebase -i HEAD~5 And move the first patch to the end of the list. +You might want to preserve merges, if you have a history like this: + +------------------ + X + \ + A---M---B + / +---o---O---P---Q +------------------ + +Suppose you want to rebase the side branch starting at "A" to "Q". Make +sure that the current HEAD is "B", and call + +----------------------------- +$ git rebase -i -p --onto Q O +----------------------------- + Authors ------ Written by Junio C Hamano and