简体   繁体   English

将主分支合并到功能分支,然后再次返回

[英]Merging master branch into feature branch then back again

I have a feature branch that was branched from my master branch a some time ago. 我有一个功能分支,它是从我的master分支分支出来的。 I have since developed quite a lot of additional features, which have all now been merged into the master branch. 从那以后,我开发了很多其他功能,所有这些功能现在都已合并到master分支中。 Now I need to merge the master branch into this old feature branch (to get some important code updates from the master branch). 现在,我需要将master分支合并到这个旧功能分支中(以从master分支中获取一些重要的代码更新)。 Can I do this and then, once I have completed testing on this old feature branch, merge it back into the master branch (prior to going live)? 我可以执行此操作,然后在完成对旧功能分支的测试后,将其合并回master分支(在启用之前)吗?

Yes. 是。

This is actually good practice - keep the branches up-to-date with master so that when they eventually are ready to be merged back to master there is little/no risk of conflicts, and the branch code has been tested along against the then-latest changes in master. 这实际上是一个好习惯-保持分支与master保持最新,以便当它们最终准备好合并回master时,几乎没有冲突的风险,并且分支代码已经针对当时的情况进行了测试-掌握最新变化。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM