简体   繁体   English

父分支在子分支之前合并开发的情况如何处理?

[英]How to deal with the situation that the parent branch was merged to develop before a child branch?

My coworker created the feature-parent-branch 20 days ago and I created the feature-child-branch 15 days ago using git town .我的同事在 20 天前创建了 feature-parent-branch,我在 15 天前使用git town创建了 feature-child-branch。 Then he merged the feature-parent-branch to the develop branch 12 days ago.然后他在 12 天前将 feature-parent-branch 合并到了 development 分支。 Then I finished my ticket 2 days ago and I merged the feature-child-branch to the feature-parent-branch using git town .然后我在 2 天前完成了我的票,我使用git town将 feature-child-branch 合并到 feature-parent-branch 。

However, I found that there are about 50 files differences between feature-parent-branch and develop.但是,我发现 feature-parent-branch 和 develop 之间大约有 50 个文件差异。

When I worked on the ticket, the main branch was feature-parent-branch in git town config.当我处理工单时,主分支是 git 城镇配置中的 feature-parent-branch。

I am not sure whether these 50 files are not changed by the recent PRs.我不确定最近的 PR 是否更改了这 50 个文件。 Is there a safe way to merge my code to develop from feature-parent-branch?有没有一种安全的方法来合并我的代码以从功能父分支开发?

Thank you so much!太感谢了!

Now, I got the ways to solve this kind of problem if creating a feature-child-branch based on a feature-parent-branch while feature-parent-branch was merged to develop earlier than feature-child-branch:现在,如果基于 feature-parent-branch 创建 feature-child-branch 而 feature-parent-branch 被合并以早于 feature-child-branch 开发,我得到了解决此类问题的方法:

  1. reset the git-town config to develop.重置 git-town 配置以进行开发。
  2. sync develop to feature-child-branch and solve conflicts.同步开发到功能子分支并解决冲突。
  3. ship feature-child-branch.运送功能子分支。

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

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