从Subversion迁移到Git我如何才能找到提交修订号的提交? [英] Migrating from Subversion to Git how can I find a commit given a revision number?

查看:90
本文介绍了从Subversion迁移到Git我如何才能找到提交修订号的提交?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用svn2git从内部使用git-svn从Subversion迁移到Git我想知道如何找到特定的修订版本。



它是相当普遍的问题跟踪有如下评论:
在r12345修正。



鉴于此,我希望能够,例如,提取对应于r12345的差异。



预先感谢。

问候

解决方案

在给定修订版本号的情况下,您可以找到

  git svn find-rev r1938 

我不知道是否有镜像的方式来获得提交或任何东西,但你可以写一些像

  git log -p`git svn find-rev r1938` 






更新:请注意,您也可以抓取 $ b $ $ p $ git svn log -r 1938






更新再次注意:注意 find-rev 也可以反过来:

  git svn find-rev c7443021942 

返回SVN提交号码。


Migrating from Subversion to Git using svn2git (which internally uses git-svn) I'd like to know how I can find a specific revision commit.

It is quite common to have issues tracker to have comments like: "Fixed in r12345".

Given this, I'd like to be able, for example, to extract the diff corresponding to r12345.

Thanks in advance.

Regards

解决方案

Given the revision number, you can find the Git SHA with

git svn find-rev r1938

I don't know if there's a "one-shot" way to get the commit or anything, but you can write something like

git log -p `git svn find-rev r1938`


Update: note that you can also grab the commit message with

git svn log -r 1938


Update again: note that find-rev also works in reverse:

git svn find-rev c7443021942

returns the SVN commit number.

这篇关于从Subversion迁移到Git我如何才能找到提交修订号的提交?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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