如何将分支合并到主干?
我在 SVN merge
方面遇到了一个特殊问题。我想从开发分支合并到主干。 我们有多个开发分支同时切断了主干。
我使用以下命令将这些分支之一合并到主干:
svn merge trunk branch_1
我看到不属于该分支的更改被合并到主干中。 我做错了什么?
SVN版本:
Subversion 命令行客户端,版本 1.6.16-SlikSvn-tag-1.6.16@1076804-WIN32。
I'm facing a peculiar problem with SVN merge
. I want to merge from a dev branch to trunk.
We have multiple dev branches cut off the trunk at the same time.
I'm merging one of those branches to trunk with this command:
svn merge trunk branch_1
I see changes that are not part of this branch, getting merged into trunk.
What am I doing wrong ?
SVN Version :
Subversion command-line client, version
1.6.16-SlikSvn-tag-1.6.16@1076804-WIN32.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您的
svn merge
语法错误。您想要签出
trunk
的工作副本,然后使用svn merge - -reintegrate
选项:请参阅SVN 书籍中有关合并的章节< /a> 对于更多细节。
请注意,在撰写本文时,这是正确的答案(并且已被接受),但事情已经发生了变化。请参阅topek的答案,以及http://subversion.apache.org/docs/release -notes/1.8.html#自动重新集成
Your
svn merge
syntax is wrong.You want to checkout a working copy of
trunk
and then use thesvn merge --reintegrate
option:See the SVN book chapter on merging for more details.
Note that at the time it was written, this was the right answer (and was accepted), but things have moved on. See the answer of topek, and http://subversion.apache.org/docs/release-notes/1.8.html#auto-reintegrate
如果您的工作目录指向主干,那么您应该能够合并您的分支:
请务必在主干的根目录中发出此命令
If your working directory points to the trunk, then you should be able to merge your branch with:
be sure to be to issue this command in the root directory of your trunk
在主干中执行 svn update,记下修订号。
从主干:
您可以通过执行 svn log 检查分支从主干中被切断的位置
Do an svn update in the trunk, note the revision number.
From the trunk:
You can check where the branch was cut from the trunk by doing an svn log
语法错误,应该是
The syntax is wrong, it should instead be