Skip to content
This repository
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 82 lines (67 sloc) 2.568 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
---
svn: |-
  Creating a new repository:
    mkdir /path/to/new/dir
    svnadmin create /path/to/new/dir
  Starting svnserve:
   svnserve --daemon --root /path/to/new/repository
  Importing project into svn repo:
    $ svn import -m "Wibble initial import" svn://olio/wibble/trunk
  Creating directory in svn repo:
    $ svn mkdir -m "Create tags directory" svn://olio/wibble/tags
  Branching:
    $ svn copy http://svn.example.com/repos/calc/trunk \
             http://svn.example.com/repos/calc/branches/my-calc-branch \
        -m "Creating a private branch of /calc/trunk."
    Committed revision 341.
  
  Diff / Merge:
   $ svn diff -rHEAD filename # changes in repository
   $ svn diff -rPREV:BASE filename # most recent change
   $ svn diff -r 343:344 http://svn.example.com/repos/calc/trunk
   $ svn merge -r 343:344 http://svn.example.com/repos/calc/trunk
   U integer.c
   $ svn status
   M integer.c
  
  Rollback:
    $ svn merge -r 100:99 .
    $ svn commit -m "Rollback to revision 99"
    Committed revision 101.
  
  Make a patch against the rails source:
    (in /vendor/rails/) $ svn diff > your_patch_name.diff
  
  Edit a dir's ignores:
   $ svn propedit svn:ignore your_dir_name
  Set a dir's ignores:
   $ svn propset svn:ignore "ignore1 ignore2" your_dir_name
  
  Switch a working copy to another URL
   $ svn switch --relocate http://server1:/svn/trunk/ http://server2/svn/trunk/ .
  
  Add all unversioned files in your working copy
   $ svn add --force .
  
  See all local changes live in a terminal
   $ watch 'svn st --ignore-externals|grep -v ^X'
  
  Find all new files, or unversioned files
   $ svn status | grep "^\?" | awk "{print \$2}"
  
  Find all changes, ignoring unversioned files
   $ svn status -uv 2>/dev/null | egrep "^([^\? ]| \*)"
   (There are 7 spaces before the \*, which don't show up on some browsers)
  
  Set up externals dependency
    $svn propset svn:externals "dataacccess svn://olio/dataaccess/trunk" maitai
   $svn commit -m "Added dataaccess project as an external"
  
  Log:
   $ svn log -v filename
   $ svn log -r6 filename
   $ svn log --stop-on-copy
  
  File statuses:
   C - Conflict
   G - Merged our changes with update (locally)
   U - Updated a file
   UU - Update to file AND properties
   M - Modified
   A - Added
   D - Deleted
  
  Resolve Conflicts:
   $ cp Number.txt.mine Number.txt; svn resolved Number.txt
   $ svn revert Number.txt
  
  Additional Commands:
   $ svn add --non-recursive directory_name
   $ svn co -r7 url directory
   $ svn propedit svn:ignore *.bak
Something went wrong with that request. Please try again.