Is it possible to change a bitbucket repository type?

Everton Araujo March 26, 2013

If I create a Git repository X at Bitbucket, can I change it to Mercurial later ?

8 answers

1 accepted

2 votes
Answer accepted
AgentSmith
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 27, 2013

Greetings!

The answer is, absolutely!

Here is a quick how-to link, which contains a full detailed tutorial:

http://blog.bitbucket.org/2011/10/05/converting-hg-repositories-to-git/ .. since that info was specific to coverting mercurial to git and your question is how to covert git to mercurial, I googled "bitbucket covert git to hg" and got some hits such as this:

http://ayaz.wordpress.com/2011/02/10/converting-a-git-repo-to-mercurial/

Note: the latter URL is not from Atlassian so please proceed with caution.

I hope this info was helpful.

Happy Coding!

Cheers,
Jason | Atlassian

5 votes
Boris Horvat April 11, 2014

So shouldnt the anser be NO here. I mean what you can do is export/import from one type to the other. But you cant use bitbucket option to just change repository type and let bitbucket worry about conversion and commit history (while also keeping twiki, issues and others)

3 votes
Kommit January 10, 2020

The best solution I found is "one click import to Github".

https://github.com/new/import

 

Now Github supports unlimited private repos for free user. After Bitbucket dropped its support for hg, there is no reason to keep my repos here.

Goodbye bitbucket.

danysk April 16, 2020

Nice!

I'm migrating all the legacy Mercurial repos I got to Github!

Thanks

3 votes
joebowbeer August 20, 2019

Answer is NO, but given the sunsetting of hg in 2020, it would be great if bitbucket provided a converter.

https://community.atlassian.com/t5/Bitbucket-articles/What-to-do-with-your-Mercurial-repos-when-Bitbucket-sunsets/ba-p/1155380

3 votes
Alex Yumas June 15, 2018

So the answer is NO YOU CAN'T.

The accepted solution (that refers to a dead link) talks about CONVERTING an hg repo to a new git repo. NEW one.

I want to keep my existing repo, with all the issues and wikis and everything, just change the source-control from hg to git.

Can't be done.

2 votes
Ned Batchelder December 23, 2015

Can we please have an authoritative answer to the question about the rest of the things besides the code?  Based on no one saying it's possible, it looks like there isn't a way to convert an hg repo to a git repo while keeping the issues.  True or False?

0 votes
Franz Rodenacker April 6, 2020

Use our automation solution to migrate your repos in bulk https://linx.software/docs/samples/bitbucket/gitmigration/

0 votes
AgentSmith
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 19, 2015

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events