Convert a Mercurial Repository to Git

后端 未结 12 825
醉梦人生
醉梦人生 2020-12-07 11:19

I\'ve already tried hg2git through fast-export and I\'ve already tried hg-git.

Both with no success. hg2git actually worked, but I had to ask a friend who runs a Uni

12条回答
  •  隐瞒了意图╮
    2020-12-07 12:00

    If you happen to be using GitHub and your Mercurial repo is available via HTTP/HTTPS...

    In the course of using fast-import (a great tool, that converted my repo without issue) and pushing my new git repo from my dev box to GitHub, I noticed an option to "Import Code from Another Repository" during the "Quick Setup" portion of my git repo on GitHub.

    I tested it out and achieved the same results as using fast-import. Using the GitHub import option turned out to be a bit easier in my case than fast-import (again, nothing against that tool, and no, I don't work for GitHub). The steps which worked for me were:

    1. Create a new GitHub repo
    2. Choose the "Import Code" option in Quick Setup once the repo is created
    3. Enter the URL of a publicly available hg, svn, or tfs repo and press "Begin import" in the "Github Importer" dialog

提交回复
热议问题