对主人分支进行恢复和新的更改
- 我已将当前项目的实施的一半用于主部门。
- 然后,我创建了来自主分支的新功能分支,以实现项目的其余部分。
- 由于有紧急版本,我已经从主分支中恢复了部分实现,同时将这些更改保留在我的功能分支中。
- 在恢复了我的更改后,其他开发人员为主分支添加了新的承诺。
- 现在,主分支上也很少有新的提交,我的功能分支机构上没有可用的,
我现在应该如何对主分支进行更改?
- I had committed half of the implementation of my current project to master branch.
- Then I created new feature branch from master branch to implement rest of the implementation of the project.
- Since there was an urgent release I have reverted partial implementation from master branch while keeping those changes in my feature branch.
- After reverting my changes, other developer has added new commits to master branch.
- Now there are few new commits also available on master branch which are not available on my feature branch
How should I commit my changes to master branch now?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
从点开始一个新的温度分支 的半实践提交。樱桃从主机上挑选了每个半实施的每一个实施,都可以在这个新的临时分支上。现在,将您的功能分支从主分支开始,从主分裂到临时分支。
现在,您将有一些准备合并为主人的东西。
示例:假设我们已经说
,您会说
结果
现在是由F1 F2 F3 F4的副本组成的,它准确地表达了您的功能历史记录,并且可以合并为主。
Start a new temp branch from the point before the first of the half-implementation commits. Cherry pick each of the half-implementation commits from master onto this new temp branch. Now rebase your feature branch, starting where it split from master, onto the temp branch.
Now you will have something ready to merge into master.
Example: suppose we have
Then you would say
The result is
Now feature consists of copies of F1 F2 F3 F4, expressing exactly the history of your feature, and it is ready to merge into master.
您也可以从主分支中拉出进行的更改,然后合并并与现有分支,同步并推回主分支。
You can also pull from the master branch for the changes made then merge and compare with your existing branch , sync and push back into master branch.