List of Subversion’s common commands

Since my senior project will closely relate to Subversion. I’ll record the short list here for further reference.

If you’re looking for more complete list, I suggest you to follow here

Checking that Subversion is installed

  1. svn –version

Creating repository and import your project

  1. mkdir /home/jemmy/svn-repos
  2. svnadmin create /home/jemmy/svn-repos
  3. create files for the first version of your project at /home/jemmy/tmp
  4. tmp> svn import -m “Put your log message here” . file:///home/jemmy/svn-repos/proj-name/trunk

Daily commands

  1. Check out svn co /home/jemmy/svn-repos/proj-name/trunk working-dir
  2. Status working-dir> svn status file.txt
  3. Diff working files and files in repository working-dir> svn diff [-rHEAD] file.txt (to specify your own diff program, use –diff-cmd. Argument -r1, -r2, .. -rHEAD tells the versions of file in repository.)
  4. Commit working-dir> svn commit -m “Put your log message here”
  5. Check log working-dir> svn log [–verbose] [file.txt] (–verbose will give you exactly all changes in each revision. Using svn log without filename will produce a log for current dir & subdir)
  6. Update working-dir> svn update -u

  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: