Using Git and Hg for the same project in the same directory

I have a project were I'm using both Git and Hg. I want to work with the same set of code on my laptop and share it with co-workers (Git) and my home computer (Hg).

The project exists and I can use the command line with no issue, but in SourceTree I see some interesting behavior. The Git repository exists first and was added to SourceTree initially. I later then create a new Hg repository and pushed the current files (already stored in Git.

I wanted to add a linkage to Hg in SourceTree as well and dragged the project over. There was no prompt and it automatically selected Hg as the type of repository.

However, when I select the Hg repository from the Bookmarks window in SourceTree what opens is a window based on Git information.

I'm guessing that there just isn't support for this atm, but I would certainly like to know if there's a way for me to configure SourceTree to make it work. It's a great tool! Thanks.

1 answer

1 accepted

Unfortunately this isn't supported at the moment; SourceTree auto-detects the type but assumes there is only one or the other. Handling both in the same folder is tricky, because suddenly you have to start asking which the user wan't to use when a folder is referenced, which is just inferred so far.

It's logged here for a potential future enhancement: https://jira.atlassian.com/browse/SRCTREE-651

Thanks Steve. I figured as much. I gave it a vote, so we'll see if it sees any movement.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 30, 2018 in Sourcetree

Tip from the team: configuring Git or Mercurial in Sourcetree

Supported Platforms macOS Windows To make using Sourcetree as simple yet powerful as possible we embed (bundle) dependencies such as Git, Git LFS, and Mercurial. We strive to keep these...

551 views 1 2
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you