Is it possible to update a commit in Mercurial?

Let's say I just sent my file to Mercurial with a description, for example, "deleted all unnecessary comments." After a few minutes, I realize that I forgot to delete some comments of this kind. I would like to be able to update this commit, which I made a few minutes ago, instead of making a new one.

Is it possible to do something like this?

+3
source share
4 answers

Assuming you haven't clicked or committed any commits, you can just use hg rollback.

+6
source

MQ . , , , , "" / , .

, :

$ hg qimport -r tip  
$ hg qrefresh -e # edit commit message  
$ hg qfinish -a
+2

histedit .

MQ, , , , hg histedit REV, rev , , . histedit , , hg histedit --continue. , , .

+2

, .

-1

Source: https://habr.com/ru/post/1779376/


All Articles