What would be the best way to set up a read-only git mirror of an existing svn repository, and set up post-commit hooks such that whenever someone commits to svn, the git mirror is automatically updated? Mainly, I’d like to run git-svn clone just once, on the server, and then let people just check out from git without having to git-svn clone the entire svn repository themselves.
Share
I do that on a project that uses SVN (pushing to a public repository on github). I don’t have a SVN commit hook, but this on a cron job:
If you trigger this from a SVN commit hook instead of a cron job, it should work.
Of course, you need to set up a remote called
githubusinggit remote add github [...]. The git repository I am using is a “bare” repository (seegit init --bare).