SVN Commands Cheat Sheet
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. —
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.
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.
Are You Using the Right Tool?
Discover the reasons why teams prefer Perforce Helix Core vs. Subversion.
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.
Helix Core P4 Commands
Create a new depot/repo.
Add files to the depot/repo.
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
Copy files into the client workspace.
svn checkout <URL> <target_name>
p4 sync, then p4 edit
Send changes to the depot.
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.
Compare files on the client workspace with revisions in the depot.
svn diff <file>
p4 diff <file>
Display information about the workspace files.
p4 fstat, p4 opened, p4 have, p4 files
Display information about the current client and server.
Provide information on changelists and changelists’ files.
Move a file.
Combine two different revisions.
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.
Store files without submitting.
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.