Converting Mercurial folder to a Git repository

后端 未结 9 2051
情话喂你
情话喂你 2020-12-04 05:21

I don\'t have a huge experience with Mercurial, I\'m mostly a Git guy.

I would love to mirror a specific Mercurial folder/file in a git Repository. What I\'m actuall

9条回答
  •  伪装坚强ぢ
    2020-12-04 05:55

    hg-git-fast-import

    https://github.com/kilork/hg-git-fast-import

    Another utility with the following features:

    1. Import of single and multiple Mercurial repositories to Git repository.
    2. Import of new revisions from previously imported Mercurial repositories to Git repository.
    3. Tags.
    4. Closed branches.
    5. Verification of the end result with diff.

    You may download binary for you platform and put somewhere in path or install with cargo (require rust to be installed):

    cargo install hg-git-fast-import
    

    Then usage is like this:

    hg-git-fast-import single /path/to/source_hg /path/to/target_git
    

    It does not need Python and Mercurial to be installed. Advanced configuration allows to replace authors or branches, make branches prefixed and more.

提交回复
热议问题