Nov
6
2010

Starting with Mercurial distributed source control management tool on Windows

I am starting to use Mercurialfor my personal projects. At the moment I use it only locally to be able to experience it but also to be able to try thing and revert easily to previous state.

To get started I downloaded

This let me work directly from a PowerShell window, Windows Explorer or Visual Studio.

To add a project to Mercurial from the PowerShell I used the following commands:

PS E:\Personal\Projects\_Spikes\DynApplication> hg init

Then I created in the same folder a file named .hgignore, excluding file or folder which I don’t want to version in my C# project:

syntax: glob

*.csproj.user
obj/
bin/
*.ncb
*.suo
_ReSharper.*
*.ReSharper.user
*.TeamCity.user

You are ready then to add files of your project to Mercurial with

PS E:\Personal\Projects\_Spikes\DynApplication> hg add

Then you need to commit the files

PS E:\Personal\Projects\_Spikes\DynApplication> hg commit –m “Initital commit”

That’s it your files are under Mercurial source control.

To get started with Mercurial I recommend you to read Hg Init: a Mercurial tutorial!

If you need some hosting there is bitbucket, which has been bought by Atlassian recently. And it is free for 5 users. For more user you will have to pay, but it is a reasonable price.
You might also use Codeplex for your open source project which supports Mercurial !

Comments (2) -

Babar

At last you're trying some DCVS! Smile
Starting with mercurial is good, as it's easier to understand than git, and one day you can easily switch to git, when you've understood all the power of it Smile
Plus the guys at github wrote some hg-git plugin, so the migration should be flawless.

laurentkempe

I also tried Git! And now I also want to try Mercurial

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading

About Laurent

Laurent Kempé

Laurent Kempé is the editor, founder, and primary contributor of Tech Head Brothers, a French portal about Microsoft .NET technologies.

He is currently employed by Innoveo Solutions since 10/2007 as a Senior Solution Architect and certified Scrum Master.

Founder, owner and Managing Partner of Jobping, which provides a unique and efficient platform for connecting Microsoft skilled job seekers with employers using Microsoft technologies.

Laurent is awarded by Microsoft since Avril 2002: Most Valuable Professional (MVP).

MVP
Certified ScrumMaster
JetBrains Academy Member

My status

Twitter

Flickr

www.flickr.com
This is a Flickr badge showing public photos and videos from Laurent Kempé. Make your own badge here.

Month List

Page List