确定cvs2git如何转换CVS树 [英] Determining how cvs2git converted CVS trees
问题描述
我成功地将一个包含八年历史的CVS主树转换为git,其中包含了各个CVS项目.我试图弄清楚cvs2git转换对各个CVS存储库的作用.
I successfully converted and imported into git an eight-year old CVS master tree which contains individual CVS projects. I am trying to figure out what the cvs2git conversion did to the individual CVS repositories.
幸运的是,我仍然拥有主CVS树,并且尚未部署任何东西,因此我可以再次执行此操作.我正在寻找git命令,这些命令可以让我探索转换后的内容,因此可以告诉我是否应该分别转换每个CVS存储库.
Fortunately, I still have the master CVS tree and have not deployed anything, so I can do this again. I'm looking for git commands that will let me explore what I converted, so I can tell if I should have converted each CVS repository separately.
推荐答案
您可以通过对子项目之一发出git log
来验证cvs2git
的作用:
You can verify what cvs2git
did by issuing git log
against one of your subprojects:
git log -- <directory>
如果该命令返回完整的历史记录,则cvs2git
将所有子项目合并为一个.根据您的评论,情况似乎如此.
If that command returns a full history, cvs2git
merged all your subprojects into one. Based on your comments this looks to be the case.
您现在可以选择:分解存储库还是将其合并?这并非总是一个明确的决定,在CVS中分解存储库的动机与在git中不同.
You've now got a choice: Fracture the repo or keep it combined? This isn't always a clear-cut decision, and the motivations for fracturing a repo in CVS are different than they are in git.
我建议尝试新的git仓库两周,而不要将其分解为子模块,子树或嵌套的仓库.这会让您熟悉常见的git命令,并让您尝试一些很棒的git功能,例如git bisect
,当您嵌套项目时,这些功能更难使用.此外,我怀疑与CVS相比,您会发现分支和特别是合并非常容易.可能是您根本不需要破坏存储库的情况.
I recommend trying your new git repository for a couple of weeks, without fracturing it into submodules, subtrees, or nested repositories. This will get you comfortable with common git commands, and let you try out some great git features like git bisect
, which are more difficult to use when you nest projects. Additionally, I suspect you'll find branching and particularly merging to be stupidly easy in comparison to CVS. It might be the case that you don't need to fracture the repository at all.
如果您决定这样做,请阅读有关该主题的其他答案.拆分仓库本身很容易.这是来自github的简单教程 .快速的Google搜索会发现更多信息.
If you decide you want to do so, give some other answers on the topic a read. Splitting the repo itself is easy. Here's a simple tutorial from github. A quick google search will turn up quite a few more.
这篇关于确定cvs2git如何转换CVS树的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!