Skip to content

Instantly share code, notes, and snippets.

@terryoy
Last active December 10, 2015 01:28
Show Gist options
  • Save terryoy/4359184 to your computer and use it in GitHub Desktop.
Save terryoy/4359184 to your computer and use it in GitHub Desktop.
SVN Commands
# Checkout source
svn co SVN_URL [PATH] [--username USERNAME] [--password PASSWORD] [-r REVISION]
# Add an unversioned(new) FILE or DIR to the version control system
svn add FILE
# show the current conflict/modified/new status of working directories and files
svn status
# You should always do a manual svn status --show-updates before trying to commit
# changes in order to check that everything is OK and ready to go.
svn status --show-updates
# update syncs your local sand box with the server. If you have made local changes,
# it will try and merge any changes on the server with your changes on your machine.
svn update
svn up
# move files or directories on working folder
svn move/mv/ren/rename SRC DEST
# checkin or commit files with remarks
svn commit/ci -m "remark" [PATH...]
# mark as delete and it will delete on both working directories and repositories when commit
svn delete/del/remove/rm FILES
# delete on repositories immediately
svn delete/del/remove/rm URL
# find out what has changed between two revisions
svn diff [-r N[:M]] --old OLD-TGT[@OLDREV] [--new NEW-TGT[@NEWREV]] [PATH...]
svn diff -r revision1:revision2 FILENAME
# create file patch
svn diff > FILE.patch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment