git svn checkout 时 分支的某个revision反复checkout出来,该怎么办?

浏览:19日期:2023-10-06

问题描述

如下面显示的例子,由于原先SVN被人为的误删误移过,导致revision其实不是很规范

然后用 git svn 时 某个特定的revision会被不停的checkout出来,由于用的Windows平台,已经超过文件路径的最大值,导致不能顺利checkout,不知道 有没有同学对这方面有经验?

refs/remotes/origin/Some_Branch@21refs/remotes/origin/Some_Branch@21-refs/remotes/origin/Some_Branch@21--refs/remotes/origin/Some_Branch@21---refs/remotes/origin/Some_Branch@21----refs/remotes/origin/Some_Branch@21-----refs/remotes/origin/Some_Branch@21------refs/remotes/origin/Some_Branch@21-------refs/remotes/origin/Some_Branch@21--------refs/remotes/origin/Some_Branch@21---------refs/remotes/origin/Some_Branch@21----------refs/remotes/origin/Some_Branch@21-----------refs/remotes/origin/Some_Branch@21------------refs/remotes/origin/Some_Branch@21-------------refs/remotes/origin/Some_Branch@21--------------refs/remotes/origin/Some_Branch@21---------------refs/remotes/origin/Some_Branch@21----------------refs/remotes/origin/Some_Branch@21-----------------refs/remotes/origin/Some_Branch@21------------------refs/remotes/origin/Some_Branch@21-------------------refs/remotes/origin/Some_Branch@21--------------------refs/remotes/origin/Some_Branch@21---------------------refs/remotes/origin/Some_Branch@21----------------------refs/remotes/origin/Some_Branch@21-----------------------refs/remotes/origin/Some_Branch@21------------------------refs/remotes/origin/Some_Branch@21-------------------------refs/remotes/origin/Some_Branch@21--------------------------refs/remotes/origin/Some_Branch@21---------------------------refs/remotes/origin/Some_Branch@21----------------------------refs/remotes/origin/Some_Branch@21-----------------------------refs/remotes/origin/Some_Branch@21------------------------------refs/remotes/origin/Some_Branch@21-------------------------------refs/remotes/origin/Some_Branch@21--------------------------------refs/remotes/origin/Some_Branch@21---------------------------------refs/remotes/origin/Some_Branch@21----------------------------------refs/remotes/origin/Some_Branch@21-----------------------------------refs/remotes/origin/Some_Branch@21------------------------------------refs/remotes/origin/Some_Branch@21-------------------------------------refs/remotes/origin/Some_Branch@21--------------------------------------refs/remotes/origin/Some_Branch@21---------------------------------------refs/remotes/origin/Some_Branch@21----------------------------------------refs/remotes/origin/Some_Branch@21-----------------------------------------refs/remotes/origin/Some_Branch@21------------------------------------------refs/remotes/origin/Some_Branch@21-------------------------------------------refs/remotes/origin/Some_Branch@21--------------------------------------------refs/remotes/origin/Some_Branch@21---------------------------------------------refs/remotes/origin/Some_Branch@21----------------------------------------------refs/remotes/origin/Some_Branch@21-----------------------------------------------...省略N行

update:楼主考虑的是从svn迁移到git,所以要尽量保留提交记录

update:楼主用了 --no-metadata 参数

问题解答

回答1:

可以在clone的时候添加,--revision,指定从哪个svn版本开始clone。

相关文章: