Skip Navigation

Find cheat sheets for every topic, or make your own to share with your friends.

All Added Bytes cheat sheets are available free at Cheatography!

Visit Cheatography »

Subversion Cheat Sheet

The Subversion Cheat Sheet, a quick reference guide for command line Subversion.

Overview

Subversion Cheat Sheet The Subversion (SVN) cheat sheet is a one-page reference sheet for Subversion on the command line.

If you like the cheat sheets, and want to say thanks, please consider buying me something from my Amazon Wishlist. Thankyou very much to those who have already hunted it down and sent me something - I'm very grateful!

Downloads

Cheatography
A more recent (even better) version of this cheat sheet is available at Cheatography!

The Subversion Cheat Sheet is released under a Creative Commons License (Attribution, Non-Commercial, Share Alike).

Please note: If you wish to link to a cheat sheet from elsewhere, please link to this page so others find all available versions, the license and the description.

Subversion Components

Thumbnail highlighting Subversion Components. Subversion is made up of several different parts. In addition to the svn command line program most people are familiar with, there are also utilities like svnlook and svnadmin, a server (svnserve) and an apache module.

Subversion Protocols

Thumbnail highlighting Subversion Protocols. Subversion clients can connect to subversion servers over a variety of different protocols, including HTTP and SSH.

Subversion Help

Thumbnail highlighting Subversion Help. If you ever find yourself stuck, of unsure of how a command works (and this cheat sheet is unable to help), check out "svn help" for general Subversion help, or "svn help command" for help with a specific command. Please note that command line commands will be marked with "$" on this cheat sheet. Explanations will be on the following line and italicized.

Repository Administration

Thumbnail highlighting Repository Administration. This section of the cheat sheet shows some of the basic, and most commonly used, repository commands, starting with how to create a new repository.

Getting Started

Thumbnail highlighting Getting Started section. The first thing you are likely to want to do with a brand new repository is add some files to it. For this, you will need the import command. If you want to create a local copy (usually referred to as a working copy) of a repository, you will need to checkout. And if you want to grab any changes to the repository, you will need to run an update.

Adding, Deleting, Copying and Moving

Thumbnail highlighting Adding, Deleting, Copying and Moving. These sections of the cheat sheet outline basic file and folder operations: Adding, Deleting, Copying and Moving.

Revert Changes

Thumbnail highlighting Revert Changes section. If you want to undo changes you have made to your working copy (i.e., change it back to the way it was when you last updated it), you can revert changes.

Logs and Blame

Thumbnail highlighting Logs and Blame. Log files are what make version control systems useful, giving you a complete history of changes to a repository. The log command will show you all the changes to a path, and the blame command will show you the changes to a path with more specific information.

Diffs and Merges

Thumbnail highlighting Diffs and Merges. The diff command shows you the difference between two files, while the merge command allows you to apply the diff between two files to a third one.

Commit

Thumbnail highlighting Commit section. Commit is the command you will use most often when working with SVN, by far. It is the command you run when you want to send what you've changed back to the repository. You should always add a message with your commit, explaining the changes you are making.

Miscellaneous Commands

Thumbnail highlighting Miscellaneous Commands. This section of the cheat sheet lists some of the lesser used Subversion commands, including cleanup - a command to resursively remove locks and complete unfinished operations (very useful when things go wrong) and resolve (when you are working on a file, but another developer has changed the file at the same time, you will have a conflict - this command is to be used when the conflict has been resolved).

Item and Property Statuses

Thumbnail highlighting Item and Property Statuses. If you run the status command on a path, you will see a list of letters (and blank spaces) for each item in the path. Each of these letters has a specific meaning and tells you something about the file you are viewing. This section lists those letters and their meanings.

Property Commands

Thumbnail highlighting Property Commands. Items in a Subversion repository have properties specific to SVN, and these properties can be added to, edited or deleted. This section lists the commands you will need in order to be able to work with properties.

Argument Shortcuts

Thumbnail highlighting Argument Shortcuts. Finally, almost every Subversion command takes a selection of arguments, and many of these have shortcuts. If you want to commit changes to a folder, but don't want to commit changes to its contents, you could type svn commit --non-recursive "/path", but it's much quicker just to use the shortcut -N instead of --non-recursive.

Thanks

Much of the content on this cheat sheet is based on the excellent SVN Book, available at http://svnbook.red-bean.com/. This is the first cheat sheet created with the involvement of the Cheat Sheets Google Group. Many thanks to Alan Switzer and Randy Merrill for their suggestions and feedback. Finally, thanks also to the 210 people who requested this cheat sheet!

Cheatography
A more recent (even better) version of this cheat sheet is available at Cheatography!

Related Cheat Sheets

Linux Command Line

Linux Command Line Cheat Sheet

The Linux Command Line Cheat Sheet, a quick reference guide for bash and other command line tools in Linux.

Python

Python Cheat Sheet

The Python Cheat Sheet, a quick reference guide for the Python programming language.

PHP (V2)

PHP Cheat Sheet (V2)

The second version of the PHP Cheat Sheet, a quick reference guide for PHP, with functions references, a regular expression syntax guide and a reference for PHP's date formating functions.


comments powered by Disqus