Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Move local Mercurial repository to Bitbucket

Has anyone taken a local repo and imported it into Bitbucket? When I go to do this, the Import page asks for a URL, but I'm working on a local computer that does not have port 8000 open to the outside world.

Can I just use some special form of a file path?

like image 667
Daniel Williams Avatar asked Dec 29 '11 02:12

Daniel Williams


People also ask

Does bitbucket use Mercurial?

Bitbucket is a code hosting and collaboration service launched in 2008. Bitbucket launched as a standalone company offering Mercurial hosting exclusively.

Does bitbucket use Git or Mercurial?

The main difference between Git and Bitbucket is that Git is a distributed version control system while Bitbucket is a web-based version control repository hosting service for development projects that use Git or Mercurial.


1 Answers

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 <[email protected]>  [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.

like image 125
César Avatar answered Oct 02 '22 10:10

César