简体   繁体   English

后续提交后将功能分支合并到主分支?

[英]Merging feature branch into master branch after subsequent commits?

Context:语境:

I created a new feature branch and merged the current master branch into my feature branch and started working on the feature.我创建了一个新的功能分支并将当前的主分支合并到我的功能分支中并开始处理该功能。 Now someone else worked on his own feature branch and his changes have been merged into the "clean" master branch.现在其他人在他自己的功能分支上工作,他的更改已合并到“干净”的主分支中。 So now I got a different version of the master branch in my feature branch that I'm working on.所以现在我在我正在处理的功能分支中获得了一个不同版本的主分支。

How would I resolve this conflict?我将如何解决这个冲突? How would I merge my changes into the newest "clean" version of the master branch?我如何将我的更改合并到主分支的最新“干净”版本中?

So now I got a different version of the master branch in my feature branch that I'm working on.所以现在我在我正在处理的功能分支中获得了一个不同版本的主分支。 How would I resolve this conflict?我将如何解决这个冲突?

It's not a conflict.这不是冲突。 It's normal Git workflow.这是正常的 Git 工作流程。 While you are working on a branch, life on other branches goes on.当你在一个分支上工作时,其他分支上的生活还在继续。

How would I merge my changes into the newest "clean" version of the master branch?我如何将我的更改合并到主分支的最新“干净”版本中?

You don't.你没有。 Just merge master into you, or rebase you onto master, and keep working.只需将 master 合并到您中,或者将您重新设置为 master,然后继续工作。

When you are finished, do that one more time and submit your pull request (or checkout master and merge you, if you are not using pull requests).完成后,再做一次并提交您的拉取请求(或结帐主并合并您,如果您不使用拉取请求)。

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

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