I mistakenly did a TortoiseHG commit while trying to do a new line, and wrote the totally wrong thing in the commit message. How can I change the commit message here ?
I have not yet pushed the commit.
On the command line, navigate to the repository that contains the commit you want to amend. Type git commit --amend and press Enter. In your text editor, edit the commit message, and save the commit.
If you are still in the draft phase (not pushed elsewhere yet), use the built-in extension hg strip <rev> command. Otherwise, you should do a hg backout , which will reverse the changeset. In case you still need the commit you made, I suggest you export it to import it again in the correct branch, before stripping.
Select "Amend current revision" from dropdown menu of commit button (marked on screenshot). Button title will become "Amend". Enter new commit message and click amend button.
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