Back in 2009 I used subversion on a daily basis; however, I have now moved on to Git. This article will serve as a reminder of popular SVN commands, in the event I ever have to use SVN again. The original idea for this article was to create a "cheat sheet".

Remove all .svn directories

There are a few reasons why you may want to remove all the .svn files. If you preformed a checkout when you should have been performing an export you will want to run the following command. You also may have copied a directory from another project and want to checkin the directory for the new project.

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

See what you are about to update

I upload from svn to my web server files. Sometimes I want to see what files will be updated before I run the update. This is how your check.

svn status -u

What revisions changed this file

See the log for a certain file

svn log file.txt

Diff specific revisions

See the difference between two revisions of the same file. Where REVNO is the revision number and HEAD is "HEAD" or the revision number

svn diff --revision REVNO:HEAD filename.php

List touched files of a certain revision

Show the files that have been changed in a certain revision. Where PREV is the revision number before the change and CHANGED is the certain version you want to know what changed

svn diff -r PREV:CHANGED --summarize