我如何比较两个git存储库? [英] How do I compare two git repositories?

查看:113
本文介绍了我如何比较两个git存储库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个不同的CVS仓库出口到git中。他们在某种程度上有分歧,我正在调查一下为什么。开发线可以追溯数年,数万次提交。

在开发线开始时,每次提交的SHA1 ID都是相同的,告诉我git-cvsimport在读取cvsps和导入结果时的做法非常一致。



但是在第一次提交和昨天之间的某个时候,SHA1 ID开始发散。我想通过比较每个存储库中的提交ID列表并查看缺少的内容来找出它的位置。有没有什么好的工具或技术可以做到这一点?

解决方案

为什么不把每个repo的git log记录到它自己的文件中并进行比较?最接近文件底部的区别是它们开始发散的地方......

I've got two different exports of our CVS repository into git. They diverge at some point, and I'm doing some investigation into why. The development line goes back several years and over tens of thousands of commits.

At the beginning of the development line, the SHA1 IDs for each commit are identical, telling me that git-cvsimport is very consistent about what it is doing when it reads the results of cvsps and imports.

But sometime between the first commit and yesterday, the SHA1 IDs begin to diverge. I'd like to find out where this is by comparing a list of commit IDs from each repository and looking to see what's missing. Are there any good tools or techniques for doing this?

解决方案

Why not just cat each repo's git log to its own file and compare? The difference closest to the bottom of the file is where they started diverging...

这篇关于我如何比较两个git存储库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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