Chinaunix首页 | 论坛 | 博客
  • 博客访问: 287374
  • 博文数量: 41
  • 博客积分: 2630
  • 博客等级: 少校
  • 技术积分: 702
  • 用 户 组: 普通用户
  • 注册时间: 2007-09-30 15:56
文章分类

全部博文(41)

文章存档

2012年(2)

2011年(2)

2010年(3)

2009年(26)

2008年(8)

我的朋友

分类:

2009-04-04 22:55:11

After subversion intalled, run "svn -v" to check it.
Donnot forget to use the subversion manual. To read the syntax, options of the command x, run
$ svn help x
 
 1. create a new repository
$ svnadmin create ./me
As a result, several files are created, the directory "me/conf" is we should concern.
p.s. if you want to remove it, delete "./me" directly.
 
2. import one existed project into your repository
As a pop convention, a project should contain 3 top-level directorys named "branches, tags,
trunck", and all your data is under "trunk".
However, my project "./test" only have one file "hello.c" for convenience.

$ svn import -m"just for test" ./test svn://192.168.0.95/test
 
3. checkout a copy of project
If one wants to checkout the project "test1" to his workspace "./proj", run
$ svn co  svn://192.168.0.95/test1 proj
 
4. update your working copy
Remember to update to the latest version before you do any change, run
$ svn up
If you want to revert a file(directory) to specified version, run
$ svn up -r version_no file/dir
 
5. commit changes
After your edits to a file, you should send all the changes to the repository, run
$ svn ci -m"I have do some changes"  hello.c  
 
6. add new file or directory
$ svn add readme.txt
$ svn ci -m"add readme.txt" readme.txt
 
7. delete one file or directory
$ svn del readme.txt
$ svn ci -m"delete readme.txt"
 
8. undo changes
Reverts the file to its premodified state by  overwriting it with local cache.
If you want to undo the changes(not committed) on readme.txt, run
$ svn revert readme.txt
 
9.view state
To see an overview of your changes, run
$ svn st
There are 6 kinds of state:
     normal
 ?  not under version control
 A scheduled for addition
 C conflicts from an update
 D scheduled for deletion
 M scheduled for local modifications to commit(or revert)
 
10. view a list of historical changes
$ svn log
 
11. list all the files and directories of the repository
$ svn ls
 
12. view differences interactively
compare the changed file with the local cached, run
$ svn diff  readme.txt
阅读(1111) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~