Search code examples
gitmercurialgithubtortoisehghg-git

How to import a Bitbucket project into Github on Windows


I have a HG project hosted on Bitbucket, and I want to move it to Github.

I have followed the guideline here to install hg-git extension, on my TortoiseHG.

I have created a repository on Github, but have not initialized it yet (it displays that instruction page), so I can't clone that git repository.

What do I go next?

EDIT: Sorry forgot to add that I will then use git from then on.

UPDATE: I borrowed a mac and converted it using fast-git-import painlessly. If anyone tried the solutions below and worked under Windows, vote it up enough, and I'll make it the answer.


Solution

  • Just found out my question is a duplicate of Converting a Mercurial (hg) repository to Git on Windows (7).

    It works well. Since it is all under Cygwin there is no need to use pageant.

    In addition to the answer to that question. I just need to generate a key under Cygwin using ssh-keygen -t rsa. I then copied the content of public key in .ssh/id_rsa.pub to Github repository setting.

    I set the git origin to the Gihub address by git remote add origin (repo address). Then finally I can git push origin master --force onto Github.