tags:

views:

68

answers:

1

We use several open source libraries 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?

+2  A: 

You'll have to install svn as well as git, unfortunately.

  1. In svn: Create the initial svn repository with a minor initial commit, e.g. of a README.
  2. In git: Create a remote branch in git corresponding to that svn repo.
  3. Create a tracking branch for that svn branch as if the svn repo were your source.
  4. Rebase your git commits from your master branch onto the tracking branch.
  5. 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.

Tchalvak