Notes to self: Keep SVN in sync w/ Git The Poor Man’s Way
There is probably a much better/faster way to do this leveraging git-svn, but for the poor fool who has to keep an SVN repo in sync w/ the development Git repo for client consumption … here are a couple helpful one liners…
Copy from the Git repo directory to the SVN repo directory
rsync -r $GIT_DIR $SVN_DIR
Detect if there are any non-.svn folder differences between the directories after (good sanity check)
diff -r $GIT_DIR $SVN_DIR | grep -v '\.svn' | wc

I’ve had to do this very thing, creating a tracking git repo of an active CVS project. be careful with your options here. without a –delete flag on rsync, you’ll only ever add files. if something is removed from SVN, you’ll never know and it could end up sticking around in your git.
Thanks for the tip about the delete flag. Luckily for the most part it is only one way to send to the client (ie we don’t need to pull back changes from SVN to Git)
[...] Tips: IE Caching Can Byte, Notes to self: Keep SVN in sync w/ Git The Poor Man’s Way, and Programming Anti-Patterns: Releasing Cthulhu. Honestly, these were cop-out posts. I know [...]
You can simply have git and svn running in the same directory and update/commit on both VCS as needed.