SVN笔记

svn status //查看状态
svn checkout project_location_url --username=hukang
svn info //查看信息
svn add filename //添加到挂起的更改列表
svn log //检查日志消息
svn commit -m "comment" //提交修改
svn diff //查看修改对比
svn revert //回退修改, -R回退目录
svn up //更新

=======================版本回退的两种方式=======================
1.svn up //更新至最新版本, 如20
2.svn log //查看历史修改, 找出要恢复的版本, 如10
(3.)svn diff 10:20 [文件或目录] //查看修改详情
4.svn merge -r 20:10 [文件或目录] //回滚到版本10
5.svn ci -m "comment" [文件或目录] //提交修改
Or
1.svn up -r 10 //回退到版本10,但是svn库不产生新的版本,下次svn up还是到最新的版本


=======================分支开发流程=======================
1. branches中的current目录同步trunk目录
cd project_location_url/branches/current
svn merge project_location_url/trunk

2.创建一个分支目录
svn copy project_location_url/branches/current project_location_url/branches/new_branches_version

3.分支合并到current
cd project_location_url/branches
svn merge project_location_url/branches/current
cd project_location_url/branches/current
svn up
svn merge --reintegrate project_location_url/branches/new_branches_version

4.将current合并到主干
cd project_location_url/branches/current
svn merge project_location_url/trunk
cd project_location_url/trunk
svn up
svn merge --reintegrate project_location_url/branches/current

posted @ 2017-11-29 20:19  Konrad  阅读(171)  评论(0编辑  收藏  举报