Thursday, January 12, 2012

SVN Cribs

(Cheetah credit: Wikipedia Commons)

svn co main --username username # "username" is from the server

svnadmin create reponame # a local repo (the repo itself, do not modify!)

mkdir pro touch proj/somefile.txt

svn import proj file:///Users/yourname/reponame/proj -m "Initial import"

svn checkout file:///Users/yourname/reponame/proj proj-copy
svn export file:///Users/yourname/reponame/proj proj-copy # export instead of checkout

cd proj-copy

svn status

svn update # Pull changes from server to local; update working copy
svn resolve --accept working # claim that conflicts were resolved 

# change, create files

svn add changedfile.txt
svn move oldfilename new filename
svn copy oldfilename new filename
svn delete filename

svn commit -m "made this change" # commit and push changes to server
svn ci -m "changes comment" filename # commit for one file

svn log
svn log filename # look at log for file

svn diff -r priorversionnumber
svn diff -r ver filename # diff only for this file

svn update -r priorversionnumber # roll back to a prior repo state
svn revert FILE

Global options:
  --username ARG           : specify a username ARG
  --password ARG           : specify a password ARG

more at
Post a Comment