Convert a Mercurial Repository to Git

后端 未结 12 852
醉梦人生
醉梦人生 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:58

    If you're really only looking to do it this once you can use hg export like this:

    hg export 0:tip -o all-changesets-in-one.patch
    

    or if git prefers only one patch per file you can create one per changeset like this:

    hg export 0:tip -o changeset-%r.patch
    

    presumably git apply can take one or the other of those formats.

提交回复
热议问题