Convert a Mercurial Repository to Git

后端 未结 12 800
醉梦人生
醉梦人生 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 11:59

    Did the following on my Mac to successfully export a Mercurial repo to Git (with full branches):

    mkdir myrepo; cd myrepo;
    git clone git://repo.or.cz/fast-export.git .
    rm -rf .git .gitignore
    git init
    ./hg-fast-export.sh -r ../path/to/local/hg/repo
    git clean -f # remove fast-export files
    

提交回复
热议问题