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

2

31

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.

Benavidez answered 12/8, 2013 at 16:57 Comment(0)
F
48

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

Firstly answered 12/8, 2013 at 19:19 Comment(1)
Note that you can't do this if the revision has already been pushed. So this makes the --pushafter= option (automatically push after a commit) less attractive.Bledsoe
C
8
  • Histedit extension allow you to edit commit message
  • You can perform next commit (change nothing) with --amend option and corrected commit message

hg add adding file.txt

hg commit -m "Init"

hg commit -m "Initial commit" --amend saved backup bundle to 719f9ea026f3-amend-backup.hg

hg log

changeset:   0:355197b0c857
...
summary:     Initial commit
Colman answered 12/8, 2013 at 17:38 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.