'Converted hg to git, but get errors using the git repo (SourceTree)?

I have converted a mercurial repo to a git repo by using hg-git (like this : How to convert mercurial repository to git repository without losing branches?).

Now I have both .git and .hg folders now but I should not need to .hg folder. But if I delete this folder, I cant open my project folder with SourceTree.

The .hg folder has bookmark,git-mapfile,hgrc, branch etc files and store folder. I guess I don't need these files. What should I do ?



Solution 1:[1]

If you think you've got it to a state where the git equivalent repository is correct, then I would do the following:

  • git clone the converted repo to a new repo (i.e. in a new directory on the same PC)

  • Remove the original from SourceTree or whatever GUI front end you are using

  • Open the new repo from the GUI. Try some stuff out, build confidence that it works.

  • If the prior step is OK, remove (or archive) the original

If the problem is really that the GUI is confused about the state of the converted repo, this may help clear it up and also verify that your conversion worked as intended.

Note - I'm not really a git nor SourceTree person so I've deliberately left the above steps somewhat descriptive rather than prescriptive.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1