Reputation: 7985
This issue is not the same as this or this.
git svn clone -s --bare https://ctags.svn.sourceforge.net/svnroot/ctags
Unknown option: bare
What is wrong?
Can I use git svn to clone a bare repo?
I have read man git-svn, and cannot find a method to clone a bare repo.
Edit 1
My tags on 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
Why I cannot push these tags into the git repository?
Upvotes: 13
Views: 8048
Reputation: 8958
Found a better solution
$ 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
After all you may set core.bare=true. The resulting bare repository will be in repo/.git
Upvotes: 16
Reputation: 8958
git-svn is a Perl script, if you open it, you can realize that it doesn't contain word "bare" at all. Option "--bare" is not supported.
As a workaround you can use simple "git svn clone" and then convert the resulting repository to bare.
Upvotes: 14