Steps to get started with Mercurial Version Control

Steps to get started with Mercurial version control 

1. To setup Mercurial on the Ubuntu you can check my post INSTALL MERCURIAL ON UBUNTU 10.04

2. Once installation is complete try running “hg” command on the terminal it should give you list of all the commands of the mercurial
  $> hg    #This will return all the commands available for the mercurial

3. Other useful commands of the Mercurial are :

$> hg help “command” e.g. if you want to check what version command will do the type $> hg help version

           – This will list the brief details about the commands of hg that we have specified.

$> hg init

– create a new repository in the given directory
– Initialize a new repository in the given directory. If the given directory does not exist, it is created.
– If no directory is given, the current directory is used

$> hg clone

– This command makes the copy of the existing repository, and repository can be copied over the network.

$> hg log
– This command give history of all the changes done.

$> hg status

– This will tell us what is status of the file whether it is newly added or a modified file.

$> hg incoming

– This command will tell us what changes the hg pull command would pull into the repository

$> hg pull

– This will pull the latest code to the .hg respository on the local machine, but it will not impact/change the working directory to get these changes in the working directory we need to use the “hg update” then we will be able to get the latest changes in the working directory.

$> hg update

– This will now update the files in the working directory


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Create a website or blog at

Up ↑

%d bloggers like this: