Image Blog SVN Command Cheat Sheet
September 8, 2017

SVN Commands Cheat Sheet

SVN
Version Control

SVN commands allow you to work more efficiently in Subversion.

Example: 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.

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

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

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

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.

Are you using the right tool?

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

Perforce vs. SVN

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
TaskSVN CommandsHelix Core P4 Commands
Create a new depot/repo.svnadmin createp4 depot
Add files to the depot/repo.svn importp4 reconcile, then p4 submit
Discard changes made to open files and revert back to latest synced version.svn checkout -r <revision> url://path/to/repop4 revert
Copy files into the client workspace.svn checkout <URL> <target_name>p4 sync, then p4 edit
Send changes to the depot.svn commitp4 submit
Open files in a client workspace to add them to the depot.svn add <file> , then svn commitp4 add <file>, then p4 submit
Remove a file.svn delete <file>p4 delete <file>
Obtain list of files in a repository.svn listp4 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 statusp4 fstat, p4 opened, p4 have, p4 files
Display information about the current client and server.svn infop4 info
Provide information on changelists and changelists’ files.svn logp4 describe
Move a file.svn movep4 move
Combine two different revisions.svn mergep4 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 updatep4 sync
Store files without submitting.svn shelvep4 shelve
Request help.svn helpp4 help

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

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.

Switch to Helix Core

 

More on SVN: