sh Mercurial(HG)到GIT

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh Mercurial(HG)到GIT相关的知识,希望对你有一定的参考价值。

Some time ago I get project.
And before get it, I ask "What CVS you use for?". Answer been "GIT!"
Ok.
But how I been impressed becouse CVS been Mercurial (HG).
Ok, it is what it is.

Google helped me.

https://git-scm.com/book/en/v2/Git-and-Other-Systems-Migrating-to-Git

All is good, but GIT repo been empty.
Becouse I forgot add key --force for command hg-fast-export.sh

/tmp/fast-export/hg-fast-export.sh -r /tmp/hg-repo --force

Thats all.
Git repo is filled with information from another repository


Exporting tag [#5864] at [hg r396] [git :397]
Issued 5544 commands
git-fast-import statistics:
---------------------------------------------------------------------
Alloc'd objects:      70000
Total objects:        67661 (    101804 duplicates                  )
      blobs  :        23686 (     92807 duplicates      14442 deltas of      23287 attempts)
      trees  :        38432 (      8997 duplicates      33183 deltas of      35329 attempts)
      commits:         5543 (         0 duplicates          0 deltas of          0 attempts)
      tags   :            0 (         0 duplicates          0 deltas of          0 attempts)
Total branches:         714 (       963 loads     )
      marks:        1048576 (      5543 unique    )
      atoms:           6679
Memory total:          5641 KiB
       pools:          2360 KiB
     objects:          3281 KiB
---------------------------------------------------------------------
pack_report: getpagesize()            =       4096
pack_report: core.packedGitWindowSize = 1073741824
pack_report: core.packedGitLimit      = 8589934592
pack_report: pack_used_ctr            =      72115
pack_report: pack_mmap_calls          =      18002
pack_report: pack_open_windows        =          1 /          1
pack_report: pack_mapped              =  173684756 /  173684756

以上是关于sh Mercurial(HG)到GIT的主要内容,如果未能解决你的问题,请参考以下文章

Mercurial 和 Git 有啥区别?

使用hg convert将git repo转换为mercurial时出错

将 Mercurial 存储库移动到现有 git 存储库的子目录中

将Mercurial项目(Bitbucket)转换为Git(Github)

从Hg迁移到Git

Git相当于hg更新