在不丢失历史记录的情况下从 CVS 迁移到 Git [英] Migrate from CVS to Git without losing history

查看:21
本文介绍了在不丢失历史记录的情况下从 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 是要使用的工具.他在这里.cvsps 是 Eric 维护的另一个工具,但它有最近不推荐使用 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 中准确反映的内容.换句话说,那里存在一些阻抗不匹配,但工具非常努力地尽可能地保留.确保检查您的转换并且您对结果感到满意.您可能需要修复部分 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. 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.

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

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