Svn (Subversion) Cheat Sheet For Unix Command Line

ADVERTISEMENT

SVN (Subversion) cheat sheet
For UNIX command line
(Note: I’ve seen Tortoise SVN recommended as a Windows client, but I haven’t tried it)
Get help:
svn help – list svn commands
svn help commandname – get help with a particular command
online documentation:
svn website:
Basic workcycle:
svn co projectpathinrepository localpath – checkout a directory in the repository for the first
time
make changes to files and directories – be sure to use svn commands to move, delete, or copy
files, otherwise svn won’t keep track of them
svn add file1 file2 dir1 dir2 dir3 … – add new files or directories to version control
svn delete fileordir1 fileordir2 … - delete local file and remove from version control
svn copy SRC DST - copy files or folders. Both SRC and DST can be either a local or
repository path
svn move SRC DST – move files, basically a copy then delete of original
svn mkdir PATH – make a new directory: either make locally and add to version control, or
make in repository if PATH is a repository path
if at any point you want to know how your working copy is different from the repository, use
svn status to look at the change status of files and svn diff to see what has changed in a
particular file. Note that this does not compare to the current repository, but to the last
time you referenced the repository using svn update.
svn update – update your local working copy with any changes from the repository. This will
automatically merge changes with your local changes if it can, and flag conflicts if it can’t.
You should also use this if you haven’t used your working copy for a while. If any conflicts
are flagged, you need to manually modify the files to choose which changes to keep, then
do svn resolved to let svn know that it is allowed to continue.
svn commit – commit changes in your local working copy into the repository. Use the “-m”
option to write a message about what you changed, or SVN will open your default editor
(specified by the environmental variable SVN_EDITOR) to write a message.

ADVERTISEMENT

00 votes

Related Articles

Related forms

Related Categories

Parent category: Education
Go
Page of 2