Git svn clone生成空目录

时间:2015-02-18 16:35:49

标签: git svn

我正在http://svn.openstreetmap.org/applications/editors/josm尝试克隆SVN存储库当我执行svn co http://svn.openstreetmap.org/applications/editors/josm它工作正常但如果我执行git svn clone -s http://svn.openstreetmap.org/applications/editors/josm它会生成一个josm目录,但只有{一个.git目录。有什么我想念的吗?这是命令的输出:

$ git svn clone -s http://svn.openstreetmap.org/applications/editors/josm
WARNING: --prefix is not given, defaulting to empty prefix.
         This is probably not what you want! In order to stay compatible
         with regular remote-tracking refs, provide a prefix like
         --prefix=origin/ (remember the trailing slash), which will cause
         the SVN-tracking refs to be placed at refs/remotes/origin/*.
NOTE: In Git v2.0, the default prefix will change from empty to 'origin/'.
Initialized empty Git repository in /tmp/josm/.git/
Using higher level of URL: http://svn.openstreetmap.org/applications/editors/josm => http://svn.openstreetmap.org
W: Ignoring error from SVN, path probably does not exist: (160013): Filesystem has no item: '/!svn/rvr/100' path not found: Additional errors:: File not found: revision 100, path '/applications/editors/josm'
W: Do not be alarmed at the above message git-svn is just searching aggressively for old history.
This may take a while on large repositories

$ cd josm; git reflog
fatal: bad default revision 'HEAD'

1 个答案:

答案 0 :(得分:3)

您使用错误的选项-s告诉git-svn期望标准的svn repo布局(trunk,branches / *,tags / *),而您尝试克隆的存储库似乎没有这样的。试试

git svn clone http://svn.openstreetmap.org/applications/editors/josm

代替。