Mirror svn repositories with git and svn2git
If you want to mirror a svn repository via git there is a nice little gem called svn2git available that provides easy setup. Updating your repository is done via
However what do you do if you clone your git repo onto another machine?
The svn metadata is not stored with the repository!
You have to set it up via
svn2git once more.
- Re-create the repository with
svn2git svn://my.domain/repositoryor whatever you need (see
- Add the remote for your repository (
git remote add origin email@example.com:USER/REPO).
- Fetch the changes from the repository (
git fetch origin master)
- Push to the repository (
git push -u origin master)
- Update repository as usual (
Please note that the example above asumes that the svn repository has a standard layout.
If your repo is somewhat special you should consult the
svn2git manual and source code for the correct options.
By the way: The first step can take quite a while. ;-)