Subversion Cheat Sheet

ADVERTISEMENT

Subversion Cheat Sheet
by
Dave Child (DaveChild)
via
Subversion Resources
Subversion Checkout Working Copy
Subversion Differences Between Files
Homepage
$ svn checkout "/path/to/repository"
$ svn diff "/path/file"
Checkout working copy into current folder
SVN Book
$ svn diff "/path/file@2" "/path/file@7"
$ svn checkout "/path/to/repository" "/path/to/folder"
$ svn diff -r 2:7 "/path/folder"
Checkout working copy into target folder
Subversion Components
Subversion Merge Changes
svn
Command line program
Subversion Update Working Copy
svnversion
Revision of working copy
$ svn merge -r2:7 "item" "/path"
$ svn update "/path"
Apply diff between revisions 2 and 7 of "item" to
svnlook
Inspect repository
Update path
path
svnadmin
Repository administration
$ svn update -r9 "/path"
$ svn merge "url1" "url2" "/path"
svndumpfilter
Filter repository stream
Update path to revision 9
Apply diff between "url1" and "url2" to path
mod_dav_svn
Apache module
Subversion Add Files and Folders
svnserve
SVN server (SVN protocol)
Subversion Miscellaneous Commands
$ svn add *
svnsync
Mirror repository
$ svn resolve "/path"
Add all items, recursively
Resolve conflict
Subversion Protocols
$ svn add itemname
$ svn cleanup "/path"
Add itemname (if folder, adds recursively)
Remove locks and complete operations
file://
Local machine
$ svn add * --force
$ svn lock "/path"
http://
HTTP (Apache)
Force recursion into versioned directories
Lock path
https://
HTTPS (SSL)
$ svn unlock "/path"
svn://
SVN (svnserve)
Subversion Commit Changes
Unlock path
svn+ssh://
SVN over SSH
$ svn commit "/path"
$ svn status "/path"
Commit changes to path
Get path status
Subversion Help
$ svn commit -m "Message" "/path"
$ svn cat "/path"
Commit with log message
$ svn help
View file contents
$ svn commit -N "/path"
$ svn help import
Commit without recursion
Show help for "import" command
Subversion Item and Property Statuses
$ svn import "/path/to/folder" "/path"
The $ symbol is used to denote commands to be typed.
No modifications (blank)
Import and commit local folder
A
Addition
Subversion Repository Administration
D
Deletion
Subversion Deleting, Copying and Moving
$ svnadmin create "/path/to/repository"
M
Modified
$ svn delete "/path"
Create new repository
R
Item replaced
Delete path
$ svnadmin setlog "/path" -r 7 message.txt
C
In conflict
$ svn -m "Delete message" delete "/path"
Change log message for revision 7 to contents of
Delete with log message
X
Externals definition
file message.txt
$ svn copy "/source" "/target"
I
Ignored
$ svnadmin dump "/path/to/repository" > filename
Copy source to target
Dump repository to file (backup)
?
Not in repository
$ svn move "/source" "/target"
$ svnadmin load "/path/to/repository" < filename
!
Item missing
Move source to target
Load repository from file (restore)
~
Object type changed
Subversion Logs and Blame
Subversion Property Commands
Subversion Argument Shortcuts
$ svn log "/path"
$ svn proplist "/path"
-m "Message"
--message
Show log messages for path
List properties
-q
--quiet
$ svn blame "/path"
$ svn propset PROP VAL "/path"
Show commits for path
-v
--verbose
Set PROP to VAL for path.
-r
--revision
$ svn propget PROP "/path"
Subversion Revert Changes
Get value of PROP
-c
--change
$ svn revert "/path"
$ svn propedit PROP "/path"
-t
--transaction
Revert changes to path
Edit PROP
-R
--recursive
$ svn revert -R "/path"
$ svn propdel PROP "/path"
-N
--non-recursive
Revert changes recursively
Delete PROP
Cheatographer
Cheat Sheet
Sponsor
Dave Child (DaveChild)
FeedbackFair, increase your conversion rate today!
This cheat sheet was published on 25th February,
2012 and was last updated on 25th February, 2012.
Try it free!

ADVERTISEMENT

00 votes

Related Articles

Related forms

Related Categories

Parent category: Education
Go