为何在冲突后github将基础合并到功能分支中 [英] Why does github merge base into feature branch after conflict

查看:76
本文介绍了为何在冲突后github将基础合并到功能分支中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们使用feature/develop/master分支进行开发.功能完成后(我们称其为Feature/123),我们将发送合并请求以合并到开发中.有时,这种合并会产生冲突,因此我们使用Github来解决冲突.

We use feature/develop/master branches for our development. When a feature is done (Let's call it feature/123) we send a pull request to merge to the develop. Sometimes this merge has conflicts so we use Github to resolve the conflict.

我的问题是,为什么在解决冲突后github会将整个dev分支合并到feature/123中?我只是想合并功能分支INTO而不是相反地开发.

My question is why would github merge the entire develop branch into feature/123 after resolving the conflict? I just wanted to merge the feature branch INTO develop not the other way around.

推荐答案

我只是在推测,但我想的想法是GitHub希望您解决 feature/123 中的冲突,而不是解决它们在 develop 中.这就是为什么它将 develop 合并到 feature/123 中的原因.

I'm only speculating but I think the idea is that GitHub wants you to resolve the conflicts in feature/123 instead of resolving them in develop. Which is why it would merge develop into feature/123.

供以后参考,这里是GitHub记录此行为的地方:

For later reference here's where GitHub documents this behavior:

警告:解决GitHub Enterprise上的合并冲突时服务器,整个头分支.制作确定您确实要提交到该分支.如果头分支是存储库的默认分支,您将获得以下选项:创建一个新分支以用作拉动的头分支要求.如果head分支受到保护,您将无法合并解决您的冲突,因此系统会提示您创建一个新的总公司.有关更多信息,请参见"关于受保护分支."

Warning: When you resolve a merge conflict on GitHub Enterprise Server, the entire base branch of your pull request is merged into the head branch. Make sure you really want to commit to this branch. If the head branch is the default branch of your repository, you'll be given the option of creating a new branch to serve as the head branch for your pull request. If the head branch is protected you won't be able to merge your conflict resolution into it, so you'll be prompted to create a new head branch. For more information, see "About protected branches."

这篇关于为何在冲突后github将基础合并到功能分支中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆