# Thursday, May 24, 2012
« Mercurial for a small team series–Mercur... | Main | Getting started with Mercurial for a sma... »

This is the second post in the Getting Started with Mercurial for a small team.

This post is going to cover Installing and basic configuration to get started using Mercurial on Windows.

Installing Mercurial on Windows

I've installed Mercurial two ways and have found both very easy to use.

With TortoiseHg (all in one download)
Using Chocolatey (package manager for your applications on the PC, think NuGet for your PC apps!)

Mercurial Settings

There's several settings you can set per repo and/or globally on the machine.  The first of these to set is your username.

To set this at the computer level on a windows machine, find the mercurial.ini file in the Windows System UserProfile folder.

Add the following:

username = Your Name <your_email_address>

You can also set it per the project by editing the hrgc file in the .hg directory for your repository.

Ignore File

The ignore file (.hgignore) tells Mercurial what files to not source control by default.  You can add anything manually in the list yourself but Mercurial won't automatically look for the patterns in this file.  There are several examples out there.  Below is the sample I am using at the moment and have found it to work well.

# Ignore file for Visual Studio 2010
# use glob syntax
syntax: glob
# Ignore Visual Studio 2010 files
packages #be sure to manually add nuget.exe in the .nuget folder

The two resharper entries aren’t needed if you don’t have Resharper. The last entry we’ll explain in a later section.
Mercurial Basics

There are a lot of great resources on the internet for this.  Here's a recommended list that I found invaluable in getting me started.


http://hgbook.red-bean.com/read/a-tour-of-mercurial-the-basics.html (the whole book is good)


http://tekpub.com/view/dotnet-oss/7 (Free video on Mercurial with CodePlex)

Command cheatsheets




Bitbucket Basics

Bitbucket also has a nice tutorial of their product at http://confluence.atlassian.com/display/BITBUCKET/bitbucket+101.

Play around, run through the samples in the resources above.  Getting the absolute basics down will help you for the next in the series, Workflow Basics.

Happy Coding! Smile

Please login with either your OpenID above, or your details below.
(will show your gravatar icon)
Home page

Comment (Some html is allowed: b, blockquote@cite, em, i, strike) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

[Captcha]Enter the code shown (prevents robots):

Live Comment Preview