Migrate from CVS to Git without losing history

后端 未结 8 1585
旧时难觅i
旧时难觅i 2020-12-07 16:41

I need to know if there is a way to migrate my code from CVS source control to Git?

If yes, what about my history of commits?

8条回答
  •  囚心锁ツ
    2020-12-07 17:16

    I've not personally done a conversion from CVS to Git, but I believe Eric Raymond's cvs-fast-export is the tool to use. He has the man page posted here. cvsps is another tool maintained by Eric, but it has recently been deprecated in favor of cvs-fast-export. cvs2git is another tool which is built on some of the same machinery as cvs2svn. The latter was extremely adept, and so I have high hopes that cvs2git is equally good.

    One thing to note: CVS is a pretty broken RCS. It's possible that it can have content that can't be reflected exactly in Git. In other words, there is some impedance mismatch there, but the tools try very hard to preserve as much as possible. Make sure to check your conversion and that you're happy with the results. You may need to fixup part of the Git history to get something more acceptable, but I doubt you'll need to.

提交回复
热议问题