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.


3 Responses to “Subversion Cheat Sheet”

Feed for this Entry
  1. 1

    Arun Says

    This is a nice command reference for svn :) Thanks !

  1. 1

    Jim O’Halloran’s Subversion Cheat Sheet - Matt Heerema : Web Design

    Pingback on Feb 23rd, 2007 at 1:22 am
  2. 2

    How to make a website » Subversion Cheat Sheets

    Pingback on Mar 17th, 2007 at 7:05 pm

Leave a Reply

XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>