How do I rename the last commit in Magit (ie. edit the commit message) ?
I can see it in magit-log-buffer-file
, but I don't know how to interact with it.
How do I rename the last commit in Magit (ie. edit the commit message) ?
I can see it in magit-log-buffer-file
, but I don't know how to interact with it.
Press c (Commit), then a (Amend), edit the message, C-c C-c, profit!
There is a command called magit-commit-reword
in latest Magit(Current version:v2.13.0)
Steps:
c
(Commit) at commit. (I usually move cursor to the first line after typing magit-status
command)w
(Reword)C-c C-c
to commitMagit manual can be found here: https://magit.vc/manual/magit.html (Search reword in the page)
c w (magit-commit-reword)
Reword the last commit, ignoring staged changes. With a prefix argument keep the committer date, otherwise change it. The option magit-commit-reword-override-date can be used to inverse the meaning of the prefix argument.
© 2022 - 2024 — McMap. All rights reserved.