如何执行合并? [英] How to perform merge?
问题描述
我有一个主分支和一个功能分支。功能分支有几个变化,但主分支有许多变化,如从存储库中删除10个项目。问题是如何将功能分支合并回主分支?
<1>将功能与主功能合并,然后使用功能主功能
OR
<2>直接合并主要功能
checkout master
checkout -b开发(假设您还没有开发分支)
merge --no-ff your-feature-branch
解决代码中的任何冲突。
测试,测试测试。
结帐大师
合并--no-ff开发
然后部署您的代码。
I 真的很喜欢这个分支模型,因为它总是让我在功能分支上构建功能,测试开发。只有合并成主人。主人没有提交。
I have a master branch and a feature branch. The feature branch has several changes but the master branch has many changes like removing 10 projects from the repository. The question is how to merge the feature branch back to master branch?
1) merge feature with master and then master with feature
OR
2) merge master with feature directly
checkout master
checkout -b develop (assuming you don't already have a develop branch)
merge --no-ff your-feature-branch
Resolve any conflicts in code. Test, test test.
checkout master
merge --no-ff develop
Then deploy your code.
I really like this branching model since it always keeps me building features on feature branches, doing final testing on develop. And only ever merging into master. No commits happen on master.
这篇关于如何执行合并?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!