Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How can I push from Git to Mercurial with SourceTree?

I've installed hg-git and am trying to push from a local Git repo to a local Mercurial repo so I can push to Bitbucket Mercurial repo. How can I do this? This answer from 2008 ( says you don't need hg-git if you're using SourceTree but I'm unable to get this working. I even tried pushing straight from local Git repo to Bitbucket Mercurial repo but it would not work.

2 answers

I think you'd be best off using commandline hg using the hg-git plugin directly

A few things though

1. Is this an existing mercurial repository? And if so, whats in the git repository?

2. Or are you trying to just convert a local git repo so it's mercurial now?

Also, bitbucket can just host a git repository now as well if that is easier for you.

The answer you linked is actually from November 8 2011 rather than November 08 ;)

SourceTree isn't really designed for this since it supports both git and hg natively. However as mentioned in the previous answer, a hg-git setup may work with 1.3 because of the cross-link support of hg main repositories with git subrepositories. 1.3 is currently only in beta, so unless you deliberately retrieved the beta you'll still be on 1.2 which definitely doesn't support it.

On the whole, if you're using SourceTree you might as well use the native system (whether that's hg or git) rather than bridging since SourceTree gives you a unified interface anyway. Bitbucket also supports either hg or git repositories now, so you're not locked in to either system.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

4,426 views 4 8
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you