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

How can I push from Git to Mercurial with SourceTree?

naomicbush January 10, 2012

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 (https://answers.atlassian.com/questions/19756/how-to-use-hg-git-with-sourcetree) 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

3 votes
Colin Goudie
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 11, 2012

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

http://hg-git.github.com/

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.

2 votes
stevestreeting
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 11, 2012

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
TAGS
AUG Leaders

Atlassian Community Events