Heim  >  Fragen und Antworten  >  Hauptteil

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

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

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

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---------------------------------------------
refs/remotes/origin/Some_Branch@21----------------------------------------------
refs/remotes/origin/Some_Branch@21-----------------------------------------------
...省略N行

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

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

伊谢尔伦伊谢尔伦2751 Tage vor842

Antworte allen(1)Ich werde antworten

  • 给我你的怀抱

    给我你的怀抱2017-05-02 09:28:11

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

    Antwort
    0
  • StornierenAntwort