Published January 20th, 2005 by Jim O'Halloran
Subversion Cheat Sheet
I’ve been using subversion a bit lately, and wanted a way to record the most commonly used commands for future reference. Like the vim stuff, if its of any use to anyone, great, otherwise at least its here for me.
To create a working copy of a project:
svn co [repositry URL] [working dir]
To update your working copy:
svn update
To send your changes back to the repository:
svn commit
This will prompt you in your favorite editor for your check in message.
To add a new file to the repository:
svn add [file name]
Don’t forget also to run this command so that svn will update the “Id:” tag…
svn propset svn:keywords Id [file name]
Adds and propsets need to be committed after they’ve been done.
To see differences between your working version and the repository:
svn diff [file name]
To revert back to the version of a file that is stored in the repository (loosing changes in your working copy):
svn revert [file name]
To view the history of a file:
svn log [file name]
To get help:
svn help
To get help on a specific command:
svn help command
e.g. svn help commit
They’re the Subversion commands I’ve used most often. The Subversion book is an excellent reference.
Arun Says
This is a nice command reference for svn
Thanks !
Oct 27th, 2006 at 6:46 pm