[英]Git workflow feature branch needs another branch
I have a master branch that needs two features added and both features need to be discussed via Pull Requests, but I have a problem I finished branch feature_1
and filled a Pull Request to the master branch. 我有一个master分支,需要添加两个功能,并且两个功能都需要通过Pull Requests进行讨论,但是我有一个问题,我完成了
feature_1
分支,并向master分支填写了Pull Request。 I need to start feature_2
and I noticed that it needs some of the changes I made in feature_1
. 我需要启动
feature_2
,我注意到它需要在feature_1
进行的一些更改。 What is the normal way to tackle this situation within the Git workflow? 在Git工作流程中解决这种情况的正常方法是什么? if it was my repository I would just merge the feature to master and create a new branch from there for the other feature.
如果这是我的存储库,则只需将功能合并到master,然后从那里为其他功能创建一个新分支。
So you need feature_1
+ master
? 所以您需要
feature_1
+ master
? Then simply branch feature_2
from feature_1
and not from master
. 然后只需从
feature_1
而不是master
分支feature_2
。
The normal way of handling such a situation is not having it in the first place: Either feature_1
and feature_2
are independent of each other, then they can be developed in parallel. 处理这种情况的通常方法不是一开始就将其置于首位:
feature_1
和feature_2
彼此独立,然后可以并行开发它们。 Or there are dependencies, then they need to be developed one after the other. 或存在依赖关系,则需要一个接一个地开发它们。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.