[英]How can I checkout a specific revision of my svn codebase using git svn
I am trying to checkout a specific revsion of my svn codebase. 我试图检查我的svn代码库的特定revsion。 Normally, to checkout, I just type
通常,要结账,我只需输入
git svn clone svn+ssh://path_to_codebase
. git svn clone svn+ssh://path_to_codebase
。 I need to checkout an older version of the codebase. 我需要签出旧版本的代码库。 How do I do that?
我怎么做?
I used the following and I obtained an older revision. 我使用了以下内容,并获得了较旧的版本。
git checkout `git svn find-rev revision_number`
Does anyone have any comments about this? 有没有人对此有任何意见?
You can git svn clone
it as usual and then use the usual tools -- git checkout
can give you access in a "floating" way or create a new git branch at your desired point. 您可以像往常一样
git svn clone
它然后使用常用工具 - git checkout
可以以“浮动”方式为您提供访问权限,或者在您想要的位置创建一个新的git分支。
You can also use git svn init
(note it behaves slightly differently than git init
) and then git svn fetch -r XXX
to fetch a specific revision. 你也可以使用
git svn init
(注意它的行为与git init
略有不同),然后git svn fetch -r XXX
来获取特定的版本。 This is much faster if the repository is large, but a future git svn fetch
will fetch the rest of the revs (but never any earlier revs). 如果存储库很大,这会快得多,但是未来的
git svn fetch
将获取剩余的转速(但从来没有任何更早的转速)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.