Linux系统下svn命令大全.pdf
《Linux系统下svn命令大全.pdf》由会员分享,可在线阅读,更多相关《Linux系统下svn命令大全.pdf(6页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、svn 命令 通常都有帮助,可通过如下方式查询:$svn help 知道了子命令,但是不知道子命令的用法,还可以查询:$svn help add 开发人员常用命令开发人员常用命令(1)导入项目$cd/project$mkdir-p svntest/trunk,branches,tags$svn import svntest https:/localhost/test/svntest-message Start project.$rm-rf svntest 我们新建一个项目 svntest,在该项目下新建三个子目录:trunk,开发主干;branches,开发分支;tags,开发阶段性标签。然后
2、导入到版本库 test 下,然后把 svntest 拿掉。(2)导出项目$svn checkout https:/localhost/test/svntest/trunk 修订版本号的指定方式是每个开发人员必须了解的,以下是几个参考例子,说明可参考 svn 推荐书。$svn diff-revision PREV:COMMITTED foo.c#shows the last change committed to foo.c$svn log-revision HEAD#shows log message for the latest repository commit$svn diff-revi
3、sion HEAD#compares your working file(with local changes)to the latest version#in the repository$svn diff-revision BASE:HEAD foo.c#compares your“pristine”foo.c(no local changes)with the#latest version in the repository$svn log-revision BASE:HEAD#shows all commit logs since you last updated$svn update
4、-revision PREV foo.c#rewinds the last change on foo.c#(foo.cs working revision is decreased)$svn checkout-revision 3#specified with revision number$svn checkout-revision 2002-02-17$svn checkout-revision 15:30$svn checkout-revision 15:30:00.200000$svn checkout-revision 2002-02-17 15:30$svn checkout-r
5、evision 2002-02-17 15:30+0230$svn checkout-revision 2002-02-17T15:30$svn checkout-revision 2002-02-17T15:30Z$svn checkout-revision 2002-02-17T15:30-04:00$svn checkout-revision 20020217T1530$svn checkout-revision 20020217T1530Z$svn checkout-revision 20020217T1530-0500(3)日常指令$svn update$svn add foo.fi
6、le$svn add foo1.dir$svn add foo2.dir-non-recursive$svn delete README$svn copy foo bar$svn move foo1 bar1$svn status$svn status-verbose$svn status-verbose-show-updates$svn status stuff/fox.c$svn diff$svn diff patchfile$svn revert README$svn revert 修改冲突发生时,会生成三个文件:.mine,.rOLDREV,.rNEWREV。比如:$ls-l sand
7、wich.txt sandwich.txt.mine sandwich.txt.r1 sandwich.txt.r2 解决修改冲突方式之一:修改冲突的文件 sandwich.txt,然后运行命令:$svn resolved sandwich.txt 方式之二:用库里的新版本覆盖你的修改:$cp sandwich.txt.r2 sandwich.txt$svn resolved sandwich.txt 方式之三:撤销你的修改,这种方式不需要运行 resolved 子命令:$svn revert sandwich.txt Reverted sandwich.txt$ls sandwich.*sa
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- Linux 系统 svn 命令 大全
限制150内