When you have a remote team, it’s important to be intentional about how you celebrate holidays. If there aren’t group events or decorations in your office, it can be hard to share the holiday spirit. This year we did something new – remote gift exchanges!
It’s possible to run a Subversion repository inside a Git repository, and desirable in one particular case for us. WordPress VIP uses SVN to manage deployments, and we use Git to collaborate on projects internally. We don’t push our work to VIP until it’s ready to deploy, but we need multiple people to be able to commit to SVN. So our Git repository is an entire WordPress installation, and the custom theme is an SVN working copy checked out from WordPress VIP’s repository. The whole SVN tree, including .svn/ files, is committed to git.
What makes this possible is that SVN stores all its metadata in .svn/ directories, except for authentication information, which is stored in your home directory (~/.subversion to be specific), but there is one wrinkle—Git will not commit empty directories, and .svn/tmp directories are typically empty. There are dozens of these directories in our theme, but there’s a quick way to solve that problem:
|for dir in $(find . -name “$basedir“ -type d); do|
|git add “$dir“;|
Invoke the script like ‘bash add-empty-dirs.sh tmp’, and the commit the results to Git. When your team members check out the Git repository, it will come with a fully loaded Subversion repository ready to use, so long as they have credentials on the remote SVN server.