Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Subversion Cheat Sheet

by Dave Child (DaveChild) via cheatography.com/1/cs/3/

Subversion Resources Subversion Repository Admini​str​ation Subversion Add Files and Folders
(cont)
Homepage http:/​/su​bve​rsi​on.a​pa​che.org/ $ svn add *
SVN Book http:/​/sv​nbo​ok.r​ed​-be​an.com/ $ svnadmin dump "​/pa​th/​to/​rep​osi​tor​y" > Add all items, recurs​ively
filename
$ svn add itemname
Subversion Components Dump repository to file (backup)
Add itemname (if folder, adds recurs​‐
svn Command line program $ svnadmin load "​/pa​th/​to/​rep​osi​tor​y" < ively)
svnversion Revision of working copy filename
$ svn add * --force
svnlook Inspect repository Load repository from file (restore)
Force recursion into versioned direct​‐
svnadmin Repository admini​str​ation ories
Subversion Property Commands
svndum​pfilter Filter repository stream
$ svn proplist "​/pa​th" Subversion Commit Changes
mod_da​v_svn Apache module
List properties
svnserve SVN server (SVN protocol) $ svn commit "​/pa​th"
$ svn propset PROP VAL "​/pa​th" Commit changes to path
svnsync Mirror repository
Set PROP to VAL for path.
$ svn commit -m "​Mes​sag​e" "​/pa​th"
Subversion Protocols $ svn propget PROP "​/pa​th" Commit with log message
file:// Local machine Get value of PROP
$ svn commit -N "​/pa​th"
http:// HTTP (Apache) $ svn propedit PROP "​/pa​th" Commit without recursion
https:// HTTPS (SSL) Edit PROP
$ svn import "​/pa​th/​to/​fol​der​" "​/pa​th"
svn:// SVN (svnserve)
$ svn propdel PROP "​/pa​th" Import and commit local folder
svn+ssh:// SVN over SSH
Delete PROP
Subversion Deleting, Copying and Moving
Subversion Help
Subversion Checkout Working Copy
$ svn delete "​/pa​th"
$ svn help
$ svn checkout "​/pa​th/​to/​rep​osi​tor​y" Delete path
$ svn help import
Checkout working copy into current
$ svn -m "​Delete messag​e" delete "​/pa​th"
Show help for "​imp​ort​" command folder
Delete with log message
The $ symbol is used to denote commands $ svn checkout "​/pa​th/​to/​rep​osi​tor​y" "​/pa​th/​‐
$ svn copy "​/so​urc​e" "​/ta​rge​t"
to be typed. to/​fol​der​"
Copy source to target
Checkout working copy into target folder
Subversion Repository Admini​str​ation $ svn move "​/so​urc​e" "​/ta​rge​t"
$ svnadmin create "​/pa​th/​to/​rep​osi​tor​y" Subversion Update Working Copy Move source to target
Create new repository $ svn update "​/pa​th"
Subversion Logs and Blame
$ svnadmin setlog "​/pa​th" -r 7 messag​e.txt Update path
Change log message for revision 7 to $ svn log "​/pa​th"
$ svn update -r9 "​/pa​th"
contents of file messag​e.txt Show log messages for path
Update path to revision 9
$ svn blame "​/pa​th"
Show commits for path

By Dave Child (DaveChild) Published 25th February, 2012. Sponsored by Readable.com


cheatography.com/davechild/ Last updated 25th February, 2020. Measure your website readability!
aloneonahill.com Page 1 of 2. https://readable.com
Subversion Cheat Sheet
by Dave Child (DaveChild) via cheatography.com/1/cs/3/

Subversion Revert Changes Subversion Item and Property Statuses

$ svn revert "​/pa​th" No modifi​cations (blank)


Revert changes to path A Addition

$ svn revert -R "​/pa​th" D Deletion

Revert changes recurs​ively M Modified


R Item replaced
Subversion Differ​ences Between Files C In conflict
$ svn diff "​/pa​th/​fil​e" X Externals definition
$ svn diff "​/pa​th/​fil​e@2​" "​/pa​th/​fil​e@7​" I Ignored
$ svn diff -r 2:7 "​/pa​th/​fol​der​" ? Not in repository
! Item missing
Subversion Merge Changes
~ Object type changed
$ svn merge -r2:7 "​ite​m" "​/pa​th"
Apply diff between revisions 2 and 7 of "​‐ Subversion Argument Shortcuts
ite​m" to path
-m "​Mes​sag​e" --message
$ svn merge "​url​1" "​url​2" "​/pa​th" -q --quiet
Apply diff between "​url​1" and "​url​2" to -v --verbose
path
-r --revision
-c --change
Subversion Miscel​laneous Commands
-t --tran​saction
$ svn resolve "​/pa​th"
-R --recu​rsive
Resolve conflict
-N --non-​rec​ursive
$ svn cleanup "​/pa​th"
Remove locks and complete operations

$ svn lock "​/pa​th"


Lock path

$ svn unlock "​/pa​th"


Unlock path

$ svn status "​/pa​th"


Get path status

$ svn cat "​/pa​th"


View file contents

By Dave Child (DaveChild) Published 25th February, 2012. Sponsored by Readable.com


cheatography.com/davechild/ Last updated 25th February, 2020. Measure your website readability!
aloneonahill.com Page 2 of 2. https://readable.com

You might also like