Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I edit an incorrect commit message in TortoiseHG Mercurial?

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.

like image 956
MBH Avatar asked Aug 12 '13 16:08

MBH


People also ask

How do I change the wrong commit message?

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.

How can I delete last commit in Mercurial?

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.


1 Answers

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.

TortoiseHG

like image 63
rpeshkov Avatar answered Oct 14 '22 23:10

rpeshkov