summaryrefslogtreecommitdiffstats
path: root/git-rebase.txt
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-03-26 15:47:14 -0700
committerJunio C Hamano <gitster@pobox.com>2021-03-26 15:47:14 -0700
commitaae21c9d9a0b8ddea3ffd56032b29f44fd4b9f8d (patch)
tree2f04e13b3906f7ec493f5f51e82b48259caf6cee /git-rebase.txt
parent4d119a12679a6e377323473c71ba298a648578e4 (diff)
downloadgit-htmldocs-aae21c9d9a0b8ddea3ffd56032b29f44fd4b9f8d.tar.gz
Autogenerated HTML docs for v2.31.1-133-g84d06
Diffstat (limited to 'git-rebase.txt')
-rw-r--r--git-rebase.txt35
1 files changed, 22 insertions, 13 deletions
diff --git a/git-rebase.txt b/git-rebase.txt
index a0487b5cc..f08ae27e2 100644
--- a/git-rebase.txt
+++ b/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