Code

Merge remote branch 'remotes/trast-doc/for-next'
[git.git] / Documentation / git-rebase.txt
index 105e89507367d6e941ef6a1e6f507c2ac5321fe2..89a957ef77bf4a832959e8b57bec3bf197f024cb 100644 (file)
@@ -308,6 +308,16 @@ which makes little sense.
        root commits will be rewritten to have <newbase> as parent
        instead.
 
+--autosquash::
+       When the commit log message begins with "squash! ..." (or
+       "fixup! ..."), and there is a commit whose title begins with
+       the same ..., automatically modify the todo list of rebase -i
+       so that the commit marked for quashing come right after the
+       commit to be modified, and change the action of the moved
+       commit from `pick` to `squash` (or `fixup`).
++
+This option is only valid when '--interactive' option is used.
+
 include::merge-strategies.txt[]
 
 NOTES
@@ -382,9 +392,12 @@ If you just want to edit the commit message for a commit, replace the
 command "pick" with the command "reword".
 
 If you want to fold two or more commits into one, replace the command
-"pick" with "squash" for the second and subsequent commit.  If the
-commits had different authors, it will attribute the squashed commit to
-the author of the first commit.
+"pick" for the second and subsequent commits with "squash" or "fixup".
+If the commits had different authors, the folded commit will be
+attributed to the author of the first commit.  The suggested commit
+message for the folded commit is the concatenation of the commit
+messages of the first commit and of those with the "squash" command,
+but omits the commit messages of commits with the "fixup" command.
 
 'git rebase' will stop when "pick" has been replaced with "edit" or
 when a command fails due to merge errors. When you are done editing
@@ -512,8 +525,8 @@ Easy case: The changes are literally the same.::
 Hard case: The changes are not the same.::
 
        This happens if the 'subsystem' rebase had conflicts, or used
-       `\--interactive` to omit, edit, or squash commits; or if the
-       upstream used one of `commit \--amend`, `reset`, or
+       `\--interactive` to omit, edit, squash, or fixup commits; or
+       if the upstream used one of `commit \--amend`, `reset`, or
        `filter-branch`.