SVN Commands Cheat Sheet
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.
Basic SVN Commands
Here are the basic SVN commands that every developer and admin should know.
The svn admincreate command creates a new, empty repository.
The svn import command commits an unversioned tree of files into a repository (and creates intermediate directories, if needed).
The svn checkout command checks out a working copy from the repository. This command is sometimes shortened to svn co.
The svn commit command sends your changes back to the SVN server.
The svn add command will add a new file to the repository — but only after you've done a svn commit.
The svn delete command will delete a file from your working copy of the repository.
The svn list command allows you to see a list of files in a repository without creating a working copy.
The svn diff command reveals the differences between your working copy and the copy in the master SVN repository.
The svn status command prints the status of working copy files and directories.
The svn info command displays information about a local or remote item.
The svn log command shows log messages from the repository.
The svn move command moves a file from one directory to another (or renames it).
The svn merge command combines two different versions into your working copy.
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.
The svn update command updates your working copy with changes from the repository.
The svn shelve command stores your changes without submitting them.
The svn help command provides a summary of available commands.
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.
|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.
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.