从旧的 SVN 存储库中查看与某个修订版本相对应的 git 提交?
我将我的存储库从 SVN 迁移到 git。我用过 这个 网站。现在我的修订版 X 中有一个错误。如何从我的 git 存储库中签出,只知道我的旧 SVN 存储库中的修订版号?
感谢您的帮助。
I migrated my repository from SVN to git. I used
THIS site. Now I have a bug in revision X. How do I checkout from my git repository, knowing only the revision number from my old SVN repo?
Thank you for your Help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用 git svn find-rev 子命令找到与 Subversion 修订版相对应的 git 提交。例如,如果您正在查找与 Subversion 修订版 3431 相对应的提交,您可以执行以下操作:
然后,要签出该修订版,只需使用第一行中的对象名称,例如,如果是:
您可以执行以下操作:
...尝试该修订版。 (请注意,这将分离 HEAD,因此如果您不知道这意味着什么,则值得首先搜索“分离的 HEAD”:))
You can find the git commit that corresponds to the Subversion revision with the
git svn find-rev
subcommand. For example, if you're looking for the commit that corresponds to Subversion revision 3431 you can do:Then, to checkout that revision, just use the object name from the first line, e.g. if it's:
You can do:
... to try that revision. (Note that this will detach HEAD, so if you don't know what that means, it would be worth searching for "detached HEAD" first :))