SVN

Short but useful.

Almost everything I do is under version control of some kind. I prefer to use git, but Drupal uses CVS, and a couple of other things I am involved with use Subversion. Sometimes it is useful to remove the files these systems leave behind -- for example, when I upload a web site I've developed to the production server. Doing it by hand is annoying, so here's a quick bash script I threw together, just in case anyone is interested.


#!/bin/bash

# A simple script to recursively remove the .git, CVS, or
# .svn files from a directory.

if [ -n $1 ]
then cd "$1"
fi

find . -name .git -print0 | xargs -0 rm -rf #for git users

Syndicate content