# Little script that stashes outstanding changes, performs an svn dcommit, and pops the stash git_stashed=0 git diff-index --quiet HEAD > /dev/null if [ $? -eq 1 ] then echo "Stashing current work..." git stash git_stashed=1 fi echo "Committing to svn..." git svn dcommit if [ $git_stashed -eq 1 ] then echo "Retrieving stashed work..." git stash pop fi