We use several open source librar开发者_开发问答ies that are hosted on github. I want to be able to clone the git repositories and basically push them into our local subversion repository so I can start a CI build internally for them.
How do I set up the connection to the svn server in a git repository that I cloned from github? I understand how to clone out of subversion.. but how do I push a new project into it?
You'll have to install svn as well as git, unfortunately.
- In svn: Create the initial svn repository with a minor initial commit, e.g. of a README.
- In git: Create a remote branch in git corresponding to that svn repo.
- Create a tracking branch for that svn branch as if the svn repo were your source.
- Rebase your git commits from your master branch onto the tracking branch.
git svn dcommit
(to send the new commits in the branch into svn)
The git-svn bridge doesn't cover all the edge cases, like pushing a git repo to an svn one or adding svn ignore properties, so sometimes you end up having to work with a svn repo copy directly in addition to the git-svn, I've found.
精彩评论