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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With