SVN将单个文件修订从分支合并到主干 [英] SVN merge individual file revisions from a branch into trunk

查看:663
本文介绍了SVN将单个文件修订从分支合并到主干的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在分支中做了一些修复,希望将其合并回主干.我不想将整个分支合并到主干中,仅合并了几个我已经完成的分支签入.正确的语法是什么?

I have a couple of fixes I've done on a branch that I want merged back into the trunk. I do not want to merge the whole branch into the trunk, just the few branch checkins I've done. What's the correct syntax for doing this?

TY, 弗雷德

推荐答案

我不确定您要问的是什么,因为标题是关于合并单个文件的,但是问题的文本是关于单个修订的.如果要合并单个修订,则需要:(合并在修订100、105、115中提交的更改)

I'm not sure exactly what you're asking as the title talks about merging single files but the text of the question talks about single revisions. In the case of merging single revisions you need: (to merge the changes committed in revisions 100, 105, 115)

cd trunk
svn merge -c 100 -c 105 -c 115 http://..../branches/mybranch .

如果您只想合并修订版本100中影响file.cpp的部分,请执行以下操作:

If you want to merge only the part of revision 100 that affects file.cpp:

cd trunk/path/to/file.cpp
svn merge -c 100 http://../branches/mybranch/path/to/file.cpp file.cpp

这篇关于SVN将单个文件修订从分支合并到主干的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆