mercurial cheat sheet - plembo/onemoretech GitHub Wiki

created: 2013/05/17 16:02:59

Another page that would better be hosted on a wiki. These are my notes on how to do various things in Mercurial. A Mercurial cheat sheet. Written for a non-expert for non-experts. This is a work in progress. Check back later to see what's new!

Dealing with Mistakes

For expert advice, take a look at Finding and Fixing Mistakes, chapter 9 in Mercurial: The Definitive Guide by Bryan O'Sullivan. To roll back an "accidental" change after a commit:

hg rollback

To undo a change to a file before you've committed:

hg revert filename

The above works with wildcards, but I wouldn't.. To back out the last changeset committed:

hg backout -m 'Back out this change' tip

Copyright 2004-2019 Phil Lembo