My Life in a Distributed Version Control System

I am completely sold to DVCS and in particular mercurial. You already know that I maintain most of my projects on bitbucket but what you dont know is the fact that every bit of my creation now lives inside a mercurial repository.
Most of my creations on my laptop are inside Documents folder. I have made two main folders inside documents, code and Docs. Code is a folder with multiple software projects and hence multiple repos. Some of them are open source projects and can be see them on bitbucket.

Docs is a single repository which contains everything else I create. The central repository for this lives on my home server. I pull and push to this home server from my Laptop every-time I connect to my home network. In that way every version of everything I create lives on my laptop and the same thing gets replicated onto home server.

May be in future I will push the repository from my Server(Desktop) to external Mercurial hosting provider (may be a pvt repo on bitbucket).Creating a third backup stored in a different geo location.

You can follow the below steps to have a similar setup.
On Desktop (or your home server):
1. Create a mercurial repository on your desktop using TortoiseHg
2. Add all your present creations into this folder. You can maintain the folder structure as you generally do,
3. Commit the whole folder with contents
4. Start the TortoiseHg - Webserver (allowing push)
5. Now Server (Desktop) is ready to send and receive from everybody in the network (make sure you are okay with that)
6. Repository is served on HTTP @ http://ip_address_of_desktop_or_server:8000

On Laptop(or any machine on the same network)
1. Right click -> TortoiseHg->clone
2. Give the url http://ip_address_of_desktop_or_server:8000
3. Say clone
4. All your creations are on your laptop
5. Make changes
6. Commit often (doesnt matter where you are)
7. Push to your server when you are back at home
8. Of course you can have as many backups as you want, just clone.

Enjoy. Now you have every single step of yours saved and backed up.

4 Responses

  1. Hari says:

    I although not using bitbuckt, but I use mercurial to track all spreadsheets that I make for important things. I still have the folder I created while changing my job and moving to Tokyo and I can trade exactly on what date I added which document

  2. Gowri says:

    Thej, what do you think of using DropBox as an alternative for Mercurial?

  3. Thejesh GN says:

    Dropbox isnt safe :)

    And I like version control. Its so well built into my daily routine. May be because I am a developer.

  1. November 25, 2011

    […] managed the first one by setting up a daily sync from my laptop to my home server. As you know my life now lives inside a version control. All I need to do is run Pull and Update on my home server. I would have backed up the data without […]