Subversion is an open source version control software app heavily used in the software dev world. I know there are 43 million other sites that have basically the same information, but I tried hard to reduce the amount of fluff and just get down to the nitty gritty.

Initial Import (adding existing code to svn repo)

svn import /path/to/src --message="Initial Import"

Diff – Discounting whitespace

svn diff -x -w

Diff – Discounting whitespace – Listing only files that are diff (not the changes)

svn diff -x -w | fgrep +++

Commit (must be in working copy dir)

svn commit -m "Your commit message"


svn delete


svn add http://fqdn/file/to/be/added

Revert (ALL working copy files)

 svn revert -R .

Revert (Single working copy file)

svn revert -R /path/to/file/filename.php

Merge (Dry run)

svn merge --dry-run -r 23:HEAD


svn merge -r 23:HEAD


svn move /path/to/dir/you/want/to/move /path/where/you/want/dir/to/go

Example Usage

#Adds existing code to your subversion repository
svn import /path/to/src --message="Initial Import"

#Checkout code for your dev environment
svn checkout /path/to/dev/env

#Checkout code for your prod environnment
svn checkout /path/to/prod/env