Top 10 Examples of SVN Commands

Top ten Examples of SVN Commands


SVN comamnds are used by most of developers when there is project development involves multiple locations by different teams.

I am listing down the some of the frequent used commands

1.

How to find the SVN version?


E:\techrocksz>svn --version
svn, version 1.6.12 (r955767)
   compiled Jun 21 2010, 16:00:59

Copyright (C) 2000-2009 CollabNet.

This will display the current svn client version

2. How to find different commands avilable in the SVN tool?


E:\techrocksz>svn help
usage: svn  [options] [args]
Subversion command-line client, version 1.6.12.
Type 'svn help ' for help on a specific subcommand.
Type 'svn --version' to see the program version and RA modules
  or 'svn --version --quiet' to see just the version number.

Most subcommands take file and/or directory arguments, recursing
on the directories.  If no arguments are supplied to such a
command, it recurses on the current directory (inclusive) by default.

Available subcommands:
   add
   blame (praise, annotate, ann)
   cat
   changelist (cl)
   checkout (co)
   cleanup
   commit (ci)
   copy (cp)
   delete (del, remove, rm)
   diff (di)
   export
   help (?, h)
   import
   info
   list (ls)
   lock
   log
   merge
   mergeinfo
   mkdir
   move (mv, rename, ren)
   propdel (pdel, pd)
   propedit (pedit, pe)
   propget (pget, pg)
   proplist (plist, pl)
   propset (pset, ps)
   resolve
   resolved
   revert
   status (stat, st)
   switch (sw)
   unlock
   update (up)

Subversion is a tool for version control.

This command will list down all the avilable commands (Add,checkout etc..) in svn client tool.

3.

How to Checkout from SVN

Checkout means creation a local workable copy of your project retrivied from remote repositiroy.

Let us say you have project located in repository created at url location http://www.techrockz.blogspot.com/svn/myrepo/myproject.
so you have to checkout myproject into your local system assuming myrepo is public repository.

svn co http://www.techrockz.blogspot.com/svn/myrepo/myproject

It will copy all your files located in myproject to current directory.

if you want to checkout the directory which is not located in public repository i.e private repository which is specific to your company. Then you have to give one more option--username and --password


svn co http://www.techrockz.blogspot.com/svn/privaterepo/myproject --username admin --password admin

No comments:

Post a Comment

Note: only a member of this blog may post a comment.