VCS - Converting Mercurial Repository to Git

First, clone the original Mercurial repo with hg:

hg clone ssh://hg@bitbucket.org/owner/repo

Now we'll need Git-Hg (massive kudos to offbytwo for making it possible):

git clone git://github.com/offbytwo/git-hg.git
cd git-hg/
git submodule update --init fast-export
cd ../repo
../git-hg/bin/git-hg clone ssh://hg@bitbucket.org/owner/repo
touch .gitignore
git add .gitignore
git pull git+ssh://git@github.com/mdvcs/md.git

Here I had some problems with the git repository already having a README file, so I just removed it and proceeded with the push.

git rm README
git push git+ssh://git@github.com/mdvcs/md.git

And you're done.