The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 

How to change an Hg repositoty to Git in SourceTree?

Kouichi C_ Nakamura
January 16, 2014

I'm very new to SourceTree and Git/Hg, and I'm stuck at the very beggining of everything.

I wanted to track the versions of a website under construction.

So I added the folder containing codes to SourceTree Bookmarks.

Although I wanted to use Git, I accidentally chose Mercurial instead.

After that, I tried to change it to Git, but I couldn't; I deleted the bookmark and repeated the addition and this time it was automatically set to Hg.

Is it difficult to set it back to Git? If it's doable even for a beginner, could somebody tell me how?

3 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

2 votes
Answer accepted
Seth
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 Champions.
January 16, 2014

You'll want to re-remove the repository from sourcetree. Navigate to the location in Explorer/Finder, and delete the .hg folder (may be hidden). Now you should be able to add the project to sourcetree with the option of which type of repository to use.

Keep in mind that you should not delete this directory on anything but a new repository because you will lose your entire history and all previous versions.

0 votes
Kouichi C_ Nakamura
January 16, 2014

Cheers! This is very helpul.

0 votes
Kouichi C_ Nakamura
January 16, 2014

Thanks a lot! It worked well. Now I've got an idea of what .hg and .git files are.

Seth
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 Champions.
January 16, 2014

Once you've actually done some commits, those directories hold not only the config for your repository, but also the contents of all the previous commits as well, so think twice about deleting the directory for an existing project.

TAGS
AUG Leaders

Atlassian Community Events