#!/bin/sh # # Used in a git repo interacting with an upstream SVN repo, this # pre-commit hook will not allow a commit of any directory named .svn if (git diff-index HEAD | cut -f2 | grep "^\(.*/\)*\.svn/" 2>&1 > /dev/null); then echo "Cowardly refusing to commit an .svn directory" exit 1 fi