转: 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 ...
随机推荐
- 暴力枚举 UVA 725 Division
题目传送门 /* 暴力:对于每一个数都判断,是否数字全都使用过一遍 */ #include <cstdio> #include <iostream> #include < ...
- POJ2186 Popular Cows(强连通分量)
题目问一个有向图所有点都能达到的点有几个. 先把图的强连通分量缩点,形成一个DAG,那么DAG“尾巴”(出度0的点)所表示的强连通分量就是解,因为前面的部分都能到达尾巴,但如果有多个尾巴那解就是0了, ...
- 2015ACM/ICPC亚洲区长春站 F hdu 5533 Almost Sorted Array
Almost Sorted Array Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Ot ...
- 【转载自W3CPLUS】如何将页脚固定在页面底部
该文章转载自:W3CPLUS 大漠的文章 http://www.w3cplus.com/css/css-sticky-foot-at-bottom-of-the-page 以下为全文 作为一个Web的 ...
- BZOJ3153 : Sone1
Top Tree模板题,写起来真不是一般的蛋疼,调了两天.常数写渣了TAT Top Tree就是在LCT的基础上加以改动,将虚边也用splay维护, 对于A向儿子所连出去的虚边,用Splay维护↓ 为 ...
- linux tar 备份命令
转载:http://www.douban.com/note/57861194/ tar [-cxtzjvfpPN] 文件与目录 ….参数:-c :建立一个压缩文件的参数指令(create 的意思):- ...
- 【wikioi】1026 逃跑的拉尔夫
题目链接 算法:BFS 14.01.02 PS: 本人再次脑残,BFS又是写得那么脓肿,突然发现我原来什么搜索都是不会的呀.. //2014-02-05已更新 ******************** ...
- 李洪强-C语言9-C语言的数据,变量和常量
一.数据 图片文字等都是数据,在计算机中以0和1存储. (一)分类 数据分为静态数据和动态数据. ①. 静态数据:一些永久性的的数据,一般存储在硬盘中,只要硬盘没坏数据都是存在的.一般以文件的形式存储 ...
- Marching Cube
GPU-Marching-Cubes An Implementation of the Marching Cubes[1] Algorithm Marching Cubes Matlab The St ...
- c#中分布方法和分部类
将同一个类编写在多个文件中,类的各个文件名不同,类名相同,类名前加partial关键字,这种类型叫分部类. 在分部类中可以建立分部方法,方法名前加关键字partial,分部方法只能将方法分成两部分,即 ...