常用svn 命令行

1. 创建文件夹
svn mkdir https://abc.googlecode.com/svn/branches/abc -m "create the branch"
2. 导入项目 
svn import https://ABC.googlecode.com/svn/branches/abc -m "Start project"
3. 导出项目 (sd sync ...)
svn checkout https://abc.googlecode.com/svn/branches/abc
4. 采用 export 的方式来导出一份“干净”(unversioned)的项目
svn export http://svn.chinasvn.com:82/pthread pthread
5. 为失败的事务清场
svn cleanup
6. 在本地进行代码修改,检查修改状态
svn status -v
svn diff
7. 更新(update)服务器数据到本地
svn update directory
svn update file
8. 增加(add)本地数据到服务器
svn add file.c
svn add dir
9. 对文件进行改名和删除
svn move b.c bb.c
10. 提交(commit)本地文档到服务器
svn commit --cl ChangelistName -m "commit"
11. 查看日志
svn log directory
svn log file
12. 使用changelist的概念
1) 向deposit加入a.txt,并且将其加入到名为"cl2"的changelist中
svn add a.txt
svn changelist cl2 a.txt
2) 查看所有changelist的信息
svn status
3) 从cl2中删除a.txt
svn changelist --remove a.txt 需要主意的是无需提供changelist name,系统会自己处理
4) 删除某个changelist
当某个changelist中的所有文件都被remove了之后,这个changelist本身也就被清除了
13. 删除不需要进行版本控制的文件
(客户端)svn remove PATH
(服务器端)svn remove URL
14. 文件(夹)copy
比如说,当需要重新开一个branch,并且是从trunk下面copy一份出来。那么可以这样做
svn mkdir https://smart-ptr.googlecode.com/svn/branches/SmartPtrWithNew -m "create the branch"
svn copy https://smart-ptr.googlecode.com/svn/trunk https://smart-ptr.googlecode.com/svn/branches/SmartPtrWithNew -m "xxxx"

15. merge

其实真心没有看懂merge的说明,等碰到了再研究一下。 

原文地址:https://www.cnblogs.com/aicro/p/2482971.html