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.