Mercurial: roll back an “hg commit –amend”.

You can use hg reflog (from the journal extension) and hg reset <hash>.

hg reflog -v

should give something like:

<old-hash> -> <new-hash> <user> <timestamp>  commit --amend <some-path>

if that is the amend you want to revert, just use:

hg reset <old-hash>

The commit will be reverted to what is previously was and the changes that were amended should now be uncommitted changes (check using hg status and hg diff).

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)