L
o
a
d
i
n
g
.
.
.
https://michele.zonca.org

shared repository between svn and git without git-svn

By Michele Zonca

11 April 2011

In mashape, internally, we are using subversion. But we wanted to open some code (the server and client libraries) on github (here our profile: github.com/Mashaper).

When you have to create a brand new github repository the process is pretty straightforward

  • create a new repository on github
  • enter your working copy
  • git init
  • create a new .gitignore with “.svn” as content
  • git remote add origin $github-repo-url
  • git add/commit and push

When the repository is already on github (maybe you are working from another pc) the process is a little bit tricky

  • checkout from svn
  • enter the working copy
  • git clone –no-checkout $github-repo-url
  • create a new .gitignore with “.svn” as content
  • git reset and, if needed, checkout/add

in this way I can commit on both version control systems, to have the same location shared on subversion (needed for some internal scripts) and the open source version.

And, obviously, I can send and receive updates in each direction