On Thursday, November 15, 2012 11:17:08 AM UTC+1, smith jack wrote:
> i use git svn to clone svn repo locally, then i push this local git repo
> to github,
> after that, i am surprised to find that there is only one branch named
> master on github, why? there should be more branches on it rather than only
> one..
> in fact, there are more than 20 svn branches on the svn repo from which i
> using git svn clone.
>
>
You can set up your local git-svn repo to always push all branches to
github like this:
In the local repo, add the github remote:
git remote add github [url-to-your-github-repo]
Now, edit the file inside [repo]/.git/config.
Set fetch to do remotes instead of heads (modify the existing line under
the github remote):
fetch = +refs/remotes/*:refs/remotes/bare/*
Secondly: Add a push configuration, to push all remotes to heads:
push = refs/remotes/*:refs/heads/*
Now, pushing to github will push all subversion branches:
git push github
I did a quick demo of exactly this at the time-point 46:50 in this video:
http://vimeo.com/28762003
--