Mercurial Cheat Sheets

If you’re interested in using Mercurial / Hg from the command line (i.e., not through TortoiseHg), you may be interested in any of a number of cheat sheets that are available. I keep one like this on my desk:

http://www.cheatography.com/codeshane/cheat-sheets/mercurial-hg/

To start with Hg on the command line, open a terminal, type cd /path/to/your/repository/folder (cd for Change Directory), and then use any of the commands given on the sheet.

hg summary, for instance, will give you a summary of the Commit to which your working directory is Updated. hg commit -m "Commit message goes here" makes a commit with a given commit message. hg pull https://url_from_bitbucket Pulls changes from a remote repository (like from BitBucket).

On Mac and Linux machines (and Windows machines with Cygwin installed), you can use man hg (for ‘Manual for hg’) from the command line to see the full Mercurial documentation, with all of the command line flags (like -m above) explained.

Post a comment

You may use the following HTML:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>