Tutorial - getting started: installation

Installing Mercurial is straightforward.

Once you're done, come back here.

Note: This tutorial assumes you are running a version of Mercurial later than 0.6. In other words, if you have the 0.6 release, the tutorial will not work for you. This tutorial was last updated for Mercurial 0.9.1.

The Mercurial program is named hg. Every Mercurial command starts with hg, followed by the command name, followed by any relevant options and arguments.

Now that Mercurial is installed, we should be able to simply type hg at the prompt, and the program should display some helpful command summaries:

$ hg
Mercurial Distributed SCM

basic commands (use "hg help" for the full list or option "-v" for details):

 add        add the specified files on the next commit
 annotate   show changeset information per file line
 clone      make a copy of an existing repository
(...)

If this is not the case, there is something wrong with your installation, and you should take a look at InstallTroubleshooting.

To determine what version of Mercurial we are running, let's type:

$ hg version
Mercurial Distributed SCM (version 0.9.1)

Copyright (C) 2005 Matt Mackall <mpm@selenic.com>
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

If all has gone well, let's continue on to TutorialClone.


CategoryTutorial