summaryrefslogtreecommitdiff
path: root/Documentation/git-rebase.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/git-rebase.txt')
-rw-r--r--Documentation/git-rebase.txt35
1 files changed, 22 insertions, 13 deletions
diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt
index a0487b5cc5..f08ae27e2a 100644
--- a/Documentation/git-rebase.txt
+++ b/Documentation/git-rebase.txt
@@ -593,16 +593,17 @@ See also INCOMPATIBLE OPTIONS below.
--autosquash::
--no-autosquash::
- When the commit log message begins with "squash! ..." (or
- "fixup! ..."), and there is already a commit in the todo list that
- matches the same `...`, automatically modify the todo list of rebase
- -i so that the commit marked for squashing comes right after the
- commit to be modified, and change the action of the moved commit
- from `pick` to `squash` (or `fixup`). A commit matches the `...` if
- the commit subject matches, or if the `...` refers to the commit's
- hash. As a fall-back, partial matches of the commit subject work,
- too. The recommended way to create fixup/squash commits is by using
- the `--fixup`/`--squash` options of linkgit:git-commit[1].
+ When the commit log message begins with "squash! ..." or "fixup! ..."
+ or "amend! ...", and there is already a commit in the todo list that
+ matches the same `...`, automatically modify the todo list of
+ `rebase -i`, so that the commit marked for squashing comes right after
+ the commit to be modified, and change the action of the moved commit
+ from `pick` to `squash` or `fixup` or `fixup -C` respectively. A commit
+ matches the `...` if the commit subject matches, or if the `...` refers
+ to the commit's hash. As a fall-back, partial matches of the commit
+ subject work, too. The recommended way to create fixup/amend/squash
+ commits is by using the `--fixup`, `--fixup=amend:` or `--fixup=reword:`
+ and `--squash` options respectively of linkgit:git-commit[1].
+
If the `--autosquash` option is enabled by default using the
configuration variable `rebase.autoSquash`, this option can be
@@ -887,9 +888,17 @@ If you want to fold two or more commits into one, replace the command
"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.
+message for the folded commit is the concatenation of the first
+commit's message with those identified by "squash" commands, omitting the
+messages of commits identified by "fixup" commands, unless "fixup -c"
+is used. In that case the suggested commit message is only the message
+of the "fixup -c" commit, and an editor is opened allowing you to edit
+the message. The contents (patch) of the "fixup -c" commit are still
+incorporated into the folded commit. If there is more than one "fixup -c"
+commit, the message from the final one is used. You can also use
+"fixup -C" to get the same behavior as "fixup -c" except without opening
+an editor.
+
'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