从CVS迁移到GIT而不会丢失历史记录 [英] migrate from CVS to GIT without losing history

查看:191
本文介绍了从CVS迁移到GIT而不会丢失历史记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要知道是否有方法将我的代码从 CVS 源代码控制迁移到 GIT

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?

推荐答案

没有亲自完成从CVS到Git的转换,但我相信Eric Raymond的 cvs-fast-export 是使用的工具。他的 这里 EM> cvsps 是维护的另一个工具埃里克,但它最近已被弃用,转而支持 cvs-fast-export cvs2git 是另一种构建于一些与 cvs2svn 相同的机器。后者非常熟练,所以我非常希望 cvs2git 同样好。

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.

有一点需要注意:CVS是一个相当破碎的RCS。有可能它的内容不能完全反映在Git中。 IOW,那里有一些不匹配的阻抗,但是这些工具尽可能地尽量保留。请务必检查您的转换,并确保您对结果满意。您可能需要修正部分Git历史记录以获得更可接受的内容,但我怀疑您需要。

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. IOW, there is some mismatch impedance 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.

这篇关于从CVS迁移到GIT而不会丢失历史记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆