Converting from Git to Bitbucket - Bitbucket - Atlassian Documentation - Confluence

<div class="posterous_bookmarklet_entry">
  > <div>

Git is another Distributed Version Control System, not unlike Mercurial itself. There are times when converting is something you want to do.

For this example, we’re going to use the popular will_paginate plugin for Ruby on Rails, hosted by Github.

The repository URL is

Mercurial does not allow cloning remote Git repositories, so you first have to download it:

$ git clone git:// will_paginate
Initialized empty Git repository in /tmp/will_paginate/.git/
remote: Counting objects: 1670, done.
remote: Compressing objects: 100% (598/598), done.
Indexing 1670 objects…
remote: Total 1670 (delta 1021), reused 1670 (delta 1021)
 100% (1670/1670) done
Resolving 1021 deltas…
 100% (1021/1021) done

Now that we have the full Git repository locally, we can convert:

$ hg convert will_paginate will_paginate_hg
initializing destination will_paginate_hg repository
scanning source…
216 Initial WillPaginate import
215 Extra css
1 added test for parent commit (removing :include from count in ActiveRecord 2.1)
0 CHANGELOG and bump up the tiny version number to 2.3.3
updating tags

You’re done! If you look in the newly created repository will_paginate_hg, you will see that the entire history, as well as branches and tags have been converted to Mercurial. As with our Subversion example you can go ahead and upload the repository to our servers.

    </div><div class="posterous_quote_citation">via [](</div>
comments powered byDisqus