Remove all svn directory

Subversion (SVN) sometimes clutter our source directory by creating .svn folder in each folder or sub folder that we version control.

The easiest way to erase them is by using a bash command:

find . -name ".svn" -type d -exec rm -rf {} \;

SVN Tricks in Linux

To show colorized svn diff

sudo aptitude install colordiff

Then on your home directory there is a hidden file called .bashrc.
Edit it.

vim ~/.bashrc

Append the following code at the end of the file

svn diff "${@}" | colordiff

Reload the .bashrc file:


Next to view the diff use svndiff instead of svn diff

Removing all .svn subfolders

rm -rf `find . -type d -name .svn`

SVN Revert All

svn st -q | awk '{print $2;}' | xargs svn revert