为什么git svn无法克隆裸仓库?

hug*_*eow 11 svn git version-control git-svn

此问题与此不同.

git svn clone -s --bare https://ctags.svn.sourceforge.net/svnroot/ctags
Unknown option: bare
Run Code Online (Sandbox Code Playgroud)

怎么了?

我可以使用git svn克隆一个裸仓库吗?

我读过man git-svn,找不到克隆裸仓库的方法.

编辑1

我在git svn repo上的标签:

git branch -r
  origin/master
  tags/Ctags-5_1
  tags/Ctags-5_1_1
  tags/Ctags-5_2
  tags/Ctags-5_2_1
  tags/Ctags-5_2_2
  tags/Ctags-5_2_3
  tags/Ctags-5_3
  tags/Ctags-5_3_1
  tags/Ctags-5_4
  tags/Ctags-5_5
  tags/Ctags-5_5_1
  tags/Ctags-5_5_2
  tags/Ctags-5_5_3
  tags/Ctags-5_5_4
  tags/Ctags-5_6
  tags/ctags-5.7
  tags/ctags-5.8
  tags/test
  trunk
Run Code Online (Sandbox Code Playgroud)

为什么我不能将这些标签推入git存储库?

Dmi*_*nko 14

找到更好的解决方案

$ git svn init https://ctags.svn.sourceforge.net/svnroot/ctags repo-git --stdlayout 
$ #edit  repo-git/.git/config to contain:
[svn-remote "svn"]
        url = https://ctags.svn.sourceforge.net/svnroot/ctags
        fetch = trunk:refs/heads/master
        branches = branches/*:refs/heads/*
        tags = tags/*:refs/tags/*
$ cd repo-git
$ git svn fetch
Run Code Online (Sandbox Code Playgroud)

毕竟你可以设置core.bare = true.生成的裸存储库将位于repo/.git中


Dmi*_*nko 12

git-svn是一个Perl脚本,如果你打开它,你可以意识到它根本不包含"裸"字.选项"--bare"不受支持.

作为一种解决方法,您可以使用简单的"git svn clone",然后将生成的存储库转换为裸.