Skip to content

Commit 2c0aa2c

Browse files
charvi-077gitster
authored andcommitted
doc/git-rebase: add documentation for fixup [-C|-c] options
Mentored-by: Christian Couder <[email protected]> Mentored-by: Phillip Wood <[email protected]> Reviewed-by: Marc Branchaud <[email protected]> Signed-off-by: Charvi Mendiratta <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent bae5b4a commit 2c0aa2c

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

Documentation/git-rebase.txt

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -887,9 +887,17 @@ If you want to fold two or more commits into one, replace the command
887887
"pick" for the second and subsequent commits with "squash" or "fixup".
888888
If the commits had different authors, the folded commit will be
889889
attributed to the author of the first commit. The suggested commit
890-
message for the folded commit is the concatenation of the commit
891-
messages of the first commit and of those with the "squash" command,
892-
but omits the commit messages of commits with the "fixup" command.
890+
message for the folded commit is the concatenation of the first
891+
commit's message with those identified by "squash" commands, omitting the
892+
messages of commits identified by "fixup" commands, unless "fixup -c"
893+
is used. In that case the suggested commit message is only the message
894+
of the "fixup -c" commit, and an editor is opened allowing you to edit
895+
the message. The contents (patch) of the "fixup -c" commit are still
896+
incorporated into the folded commit. If there is more than one "fixup -c"
897+
commit, the message from the last last one is used. You can also use
898+
"fixup -C" to get the same behavior as "fixup -c" except without opening
899+
an editor.
900+
893901

894902
'git rebase' will stop when "pick" has been replaced with "edit" or
895903
when a command fails due to merge errors. When you are done editing

0 commit comments

Comments
 (0)