转: svn合并分支到trunk
http://sepcot.com/blog/2007/04/svn-merge-branch-trunk
SVN: Merging a Branch into Trunk
This is more for my benefit than anything else, but someone might find this useful.
Recently at work, I have taken on more responsibilities. Part of that includes branch control over a few web sites I work on. It took me a while to figure out how to manage everything properly and most of the stuff I found on the web wasn’t much help so I will explain it here.
The source control program I am using is SVN and the source code is stored on a server with SSH access.
MERGE A BRANCH INTO TRUNK
- Check out a copy of trunk:
svn co svn+ssh://server/path/to/trunk
- Check out a copy of the branch you are going to merge:
svn co svn+ssh://server/path/to/branch/myBranch
- Change your current working directory to “myBranch”
- Find the revision “myBranch” began at:
svn log --stop-on-copy
This should display back to you the changes that have been made back to the point the branch was cut. Remember that number (should be rXXXX, where XXXX is the revision number).
- Change your current working directory to trunk # Perform an SVN update:
svn up
This will update your copy of trunk to the most recent version, and tell you the revision you are at. Make note of that number as well (should say “At revision YYYY” where YYYY is the second number you need to remember).
- Now we can perform an SVN merge:
svn merge -rXXXX:YYYY svn+ssh://server/path/to/branch/myBranch
This will put all updates into your current working directory for trunk.
- Resolve any conflicts that arose during the merge
- Check in the results:
svn ci -m "MERGE myProject myBranch [XXXX]:[YYYY] into trunk"
That is it. You have now merged “myBranch” with trunk.
Updated: June 18th, 2008
Steps 2-4 can be replaced by a remote log lookup:
svn log --stop-on-copy svn+ssh://server/path/to/branch
That is it. You have now merged “myBranch” with trunk.
My thanks to Samuel Wright for bringing that to my attention :-)
BONUS: CUTTING A BRANCH
Cutting a branch is a lot easier than merging a branch. And as an added bonus, I will tell you how.
- Perform an SVN copy:
svn copy svn+ssh://server/path/to/trunk svn+ssh://server/path/to/branch/newBranch -m "Cut branch: newBranch"
That’s all there is to it.
转: svn合并分支到trunk的更多相关文章
- svn 合并分支 等
[转载]svn分支(branch)创建.合并(到trunk).冲突解决. Leave a reply 转载自:http://zccst.iteye.com/blog/1430823 一.创建分支 1, ...
- svn 合并分支
1.将某一主干/分支某一时段的改变,合并到工作空间副本 2.将某一主干/分支与其他主干/分支的改变,合并到工作空间副本
- svn 合并分支代码到主干
1. eclipse 安装subclipse 2. 将主干trunk导入到eclipse中 3. 右键选择team-->合并,注意,去掉红色圈内的选项 4. next 选中select查找svn ...
- Eclipse SVN 合并分支/主干
可以从主干合并到分支,也可以从分支合并到主干,根据需要可以选择合适的选项,如下图:
- svn合并分支到主干
将分支pear_For2.3的最终版本合并到主干pear,操作步骤如下:1.选中主干pear右击-> Team -> 合并,弹出如下所示: 到此分支合并到主干已完成,若代码有冲突需找到冲突 ...
- SVN合并分支提示不是祖先关系
开发:dev 测试:test 开发完成后,需要合并到test然后部署,进入测试. F:主干 合并到那里,那里就是主干(要合并到的分支)[起始] T:分支 从那里合并那里就是分支[结束] 备注:需要精确 ...
- svn打分支和合并操作
1.svn打分支 到trunk里,选择Branch/tag.... 填写分支版本路径 到branch里svn up 一下,就有1.4.0分支了 2.svn合并 到trunk里,选择Merge.. 选择 ...
- svn branch and merge(svn切换分支和合并)详解
下文的实践主要是参考了TortoiseSVN的帮助文档和Subversion的在线文档,Subversion的在线文档:http://svnbook.red-bean.com/en/1.5/svn-b ...
- windows 下svn 创建分支 合并分支 冲突
我用的系统是win7+Subversion 1.7.4.服务器搭建就略过了,我也是从网上找的,基本上就是几个命令吧!我用的CentOs6.5 .网上找了几个命令搭建很快,基本上是: 1.# sudo ...
随机推荐
- html表单应用
<!DOCTYPE html> <html> <head> <meta name="generator" content="HT ...
- ! cocos2d sprintf的问题
char dong[100]; sprintf(dong,"%s","dongshen"); CCLOG(dong); 以上正确 char dong[100]; ...
- BZOJ2530 : [Poi2011]Party
注意到随机一组贪心解得到的团的大小不小于$\frac{N}{3}$的概率是很大的,所以一直随机下去,直到找到一组解即可,随机次数是常数级别的,所以复杂度为$O(n^2)$. #include<c ...
- BZOJ3757 : 苹果树
树上莫队,有几个坑: a可能等于b 数据范围是100000 #include<cstdio> #include<algorithm> #include<cmath> ...
- TYVJ 矩阵取数 Label:高精度+dp
题目描述 帅帅经常跟同学玩一个矩阵取数游戏:对于一个给定的n*m的矩阵,矩阵中的每个元素aij均为非负整数.游戏规则如下: 1.每次取数时须从每行各取走一个元素,共n个.m次后取完矩阵所有元素: 2. ...
- 【wikioi】2800 送外卖(状压dp+floyd)
http://www.wikioi.com/problem/2800/ 本题状压莫名其妙的tle了,(按照hzwer大神打的喂,他1000多ms,我就2000ms了?) (14.8.7更,将getnu ...
- 在Eclipse中配置Tomcat 创建和运行Servlet/JSP
在Eclipse中配置Tomcat 创建和运行Servlet/JSP 步骤一:在Eclipse中配置Tomcat(注意下载Eclipse IDE for Java EE Developers) (1) ...
- T-SQL查询进阶--深入浅出视图
视图可以看作定义在SQL Server上的虚拟表.视图正如其名字的含义一样,是另一种查看数据的入口.常规视图本身并不存储实际的数据,而仅仅存储一个Select语句和所涉及表的metadata. 视图简 ...
- 对于默认 Windows NT 安装的 SID 值
https://support.microsoft.com/en-us/kb/163846/zh-cn
- Excel 中单元格和范围的引用(即访问的表示方法)
计算机中,无非是数据和数据的处理这两件事.Excel的工作表能存储大量数据,除了这些原始数据,我们还要用函数来处理这些数据,比如求和求积,求平均值,排序等等,并把处理结果也存在单元格里.在Excel中 ...