Monday, 28 February 2011

Bitbucket Import

Following the lead of David Hay and starting to blog things so I don't forget them in future.

I'd been struggling with adding an already existing Mercurial local repository to Bitbucket and it turned out to be quite straightforward once I'd engaged my brain.

All I needed to do was create a file under the .hg directory in the root of the project called "hgrc" and populate it with:
[paths]
default = https://<your_username>@bitbucket.org/<your_username>/<your_projectname>

And then just run "hg push" from the top level project directory as I'd already run "hg add" from the same top level directory to add the project files to the local repository.

Seemples.