First you need to create a repository in Bitbucket, go to Repositories -> create repository
. Then you can choose between HTTPS or SSH.
You can customize your hgrc file like this:
[ui]
username = Your Name <youremail@example.com>
[paths]
myproject = https://.. # The one provided by Bitbucket
Now you can just push
your changes to the repository:
$ hg commit -m "my changes"
$ hg push myproject
Or pull
changes:
$ hg pull -u myproject
The -u
option will also update your local repository after pulling the changes. You can use this option instead of pulling and then updating your local repository. The -u
option is the same as doing:
$ hg pull myproject
$ hg update
You may also want to take a look to the hgignore file.