Image Blog SVN Command Cheat Sheet
September 8, 2017

SVN Commands Cheat Sheet

SVN
Version Control

Using Subversion (SVN) for version control? With SVN commands, you can work in SVN more efficiently. Here we list out some of the most popular Subversion commands along with an SVN cheat sheet. —

➡️ Make the Switch to Perforce — for free

Back to top

How to Display List of SVN Repositories

For example, using SVN commands can help you display a list of SVN repositories. Simply use the svn list repository command, and you'll get a list of all repositories and their contents.

📘 Related Resource:How to Host SVN Repositories 

Of course, this is just one of many useful SVN commands you should know. 

Back to top

Switching From SVN? Get a Better Tool

Many teams have switched from SVN to Helix Core. That's because Helix Core delivers greater speed, scale, and security. Because the commands are similar, it's easy to get started. Get it free for up to 5 users.

➡️ SWITCH FROM SVN TO HELIX CORE

Back to top

Subversion Commands - Basic SVN Commands

Here are the basic SVN commands that every developer and admin should know.

svn admincreate

The svn admincreate command creates a new, empty repository. 

svn import

The svn import command commits an unversioned tree of files into a repository (and creates intermediate directories, if needed). 

svn checkout

The svn checkout command checks out a working copy from the repository. This command is sometimes shortened to svn co.

svn commit

The svn commit command sends your changes back to the SVN server.

svn add

The svn add command will add a new file to the repository — but only after you've done a svn commit.

svn delete

The svn delete command will delete a file from your working copy of the repository. 

svn list

The svn list command allows you to see a list of files in a repository without creating a working copy. 

svn diff

The svn diff command reveals the differences between your working copy and the copy in the master SVN repository.

svn status

The svn status command prints the status of working copy files and directories.

svn info

The svn info command displays information about a local or remote item.

svn log

The svn log command shows log messages from the repository.

svn move

The svn move command moves a file from one directory to another (or renames it). 

svn merge

The svn merge command combines two different versions into your working copy.

svn revert (i.e., undo svn add)

The svn revert command reverts changes in your working copy, as well as property changes. For example, you can use svn revert to undo svn add.

svn update

The svn update command updates your working copy with changes from the repository.

svn shelve

The svn shelve command stores your changes without submitting them.

svn help

The svn help command provides a summary of available commands.

Back to top

Are You Using the Right Tool?

Discover the reasons why teams prefer Perforce Helix Core vs. Subversion.

➡️ Perforce vs. SVN

Back to top

SVN Commands Cheat Sheet

Need a handy SVN commands cheat sheet to reference?

Here, we've compiled a quick reference guide to every SVN command you'll need to know. We've also included the Helix Core P4 command equivalent, if you're considering migrating to Helix Core

SVN Commands Cheat Sheet

Task

SVN Commands

Helix Core P4 Commands

Create a new depot/repo.

svnadmin create

p4 depot

Add files to the depot/repo.

svn import

p4 reconcile, then p4 submit

Discard changes made to open files and revert back to latest synced version.

svn checkout -r <revision> url://path/to/repo

p4 revert

Copy files into the client workspace.

svn checkout <URL> <target_name>

p4 sync, then p4 edit

Send changes to the depot.

svn commit

p4 submit

Open files in a client workspace to add them to the depot.

svn add <file> , then svn commit

p4 add <file>, then p4 submit

Remove a file.

svn delete <file>

p4 delete <file>

Obtain list of files in a repository.

svn list

p4 files

Compare files on the client workspace with revisions in the depot.

svn diff <file>

p4 diff <file>

Display information about the workspace files.

svn status

p4 fstat, p4 opened, p4 have, p4 files

Display information about the current client and server.

svn info

p4 info

Provide information on changelists and changelists’ files.

svn log

p4 describe

Move a file.

svn move

p4 move

Combine two different revisions.

svn merge

p4 merge

Discard changes made to an open file.

svn revert <file or directory>

p4 revert <file or directory>

Obtain and update changes from the depot/repo to the client workspace.

svn update

p4 sync

Store files without submitting.

svn shelve

p4 shelve

Request help.

svn help

p4 help

You can compare more commands at Mapping Subversion Terms and Commands to Perforce.

Back to top

Switch From SVN Commands to P4 Commands

Helix Core and SVN can both handle large files better than Git. And they do have many basic, similar commands. But this is where the similarities end. 

Find out why SVN teams are migrating to Helix Core — and why your team should, too.

➡️ make the Switch to Helix Core

 

Back to top

More on SVN:

Back to top