Skip to content

commit: add an option to reword the last commit

Phillip Wood via GitGitGadget git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 17 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3commit docs: use backquotes when quoting optionsDocumentation/git-commit.txt+5 -50 replies
2/3commit: reorder synopsisDocumentation/git-commit.txt+5 -53 replies
3/3commit: add an option the reword HEADDocumentation/git-commit.txt builtin/commit.c t/t7501-commit-basic-functionality.sh+113 -313 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] commit: add an option to reword the last commit

If one notices a typo in the last commit after starting to stage changes for the next commit it is useful to be able to reword the last commit without changing its contents. Currently the way to do that is by specifying --amend --only with no pathspec which is not that obvious to new users (so much so that before beb635ca9c ("commit: remove 'Clever' message for --only --amend", 2016-12-09) commit printed a message to congratulate the user on figuring out how to do it). If the last commit is empty one has to pass --allow-empty as well even though the contents are not being changed. These patches contain a couple of small clean ups for the commit documentation add a --reword option for commit that rewords the last commit without changing its contents.

Phillip Wood (3):
commit docs: use backquotes when quoting options
commit: reorder synopsis
commit: add an option the reword HEAD

 Documentation/git-commit.txt          | 30 +++++++++-----
 builtin/commit.c                      | 46 +++++++++++++++++++++-
 t/t7501-commit-basic-functionality.sh | 56 +++++++++++++++++++++++++++
 3 files changed, 121 insertions(+), 11 deletions(-)

base-commit: 54e85e7af1ac9e9a92888060d6811ae767fea1bc
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-736%2Fphillipwood%2Fwip%2Fcommit-reword-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-736/phillipwood/wip/commit-reword-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/736

Signature · 1 line
gitgitgadget