分支重新集成后提交本地更改
不该发生的事今天却发生在我身上。我们正在 svn 中开发一个功能分支(服务器 afaik 1.6,客户端 1.7)。这个分行昨天重新整合,当时我不在办公室。现在我的工作副本中留下了一些本地更改,指向已经重新集成的分支。当然,部分原因是我下班后在本地留下更改,但那是另一个故事;-)
我知道再次重新集成分支不是一个选择,所以 将我的更改引入主干的最佳方法是什么?一位同事建议使用补丁,我以前从未使用过。在将更改提交到分支后,我还考虑过挑选我的更改,但我不确定这是否可行。还有其他选择吗?
非常感谢任何帮助。
此致 尼科
something that shouldn't happen, happened to me today. We were working on a feature branch in svn (Server afaik 1.6, client 1.7). This branch was reintegrated yesterday, while i was not in the office. Now i'm left with some local changes in my working copy, pointing to the already reintegrated branch. Of course its partially my fault of leaving changes locally after work, but thats another story ;-)
I know that reintegrating the branch again is not an option, so
What are the best ways to bring my changes into the trunk? A Coworker suggested using patches, which i never used before. I also thought about cherry picking my changes, after commiting them into the branch, but i'm not sure if this would work. Are there any other options?
Any help is greatly appreciated.
Best regards
Nico
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
重新集成后,分支和主干应该相同(假设头部修订版为 100)。因此,您只需在功能分支中提交更改(创建版本 101),然后将功能分支从 100(不包括)到 101(包括)合并到主干。然后删除功能分支。
After reintegration, the branch and the trunk should be identical (let's say the head revision is at 100). So, you could just commit your changes in the feature branch (creating rev 101), and merge to the trunk the feature branch from 100 (exclusive) to 101 (inclusive). Then delete the feature branch.
为您的功能创建一个新分支,并将未提交的工作副本切换(如
svn switch
)。测试、提交,然后合并到主干。Create a new branch for your features and switch (as in
svn switch
) the uncommitted working copy to it. Test, commit, and then merge into trunk.