如何在GitHub上从5个提交请求中选择2个提交? [英] How to cherry pick 2 out of 5 commits of a pull request on GitHub?

查看:421
本文介绍了如何在GitHub上从5个提交请求中选择2个提交?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是GitHub的新手。有人提交了5个提交请求。但其中3个有一个小错误,所以必须等待。如何为我的项目选择其中的2个? 解决方案

理想的解决方案是发表评论,要求撰稿人提交再次他/她的拉请求只有2提交,为了您申请所述PR(拉请求),而不必做任何工作。



另一种解决方案,从合并合并请求页面开始,将合并当地的,在你的本地克隆,在一个专门的分支。

然后,你可以樱桃选择你想要的正确提交,并推回到你的回购,但一定要留下评论在拉取请求的讨论部分中,解释了



  • ,您只考虑了5次提交中的2次,

  • 贡献者应该在你的新更新的主人(现在包括所述2个提交)之上重新布置他的工作,并且将最后一个(和希望固定)3次提交。



这与第一个选项类似,除非您不必等待修复:您可以在本地获取所需内容,测试并推送。

I'm new to GitHub. Someone submitted a pull request with 5 commits. 3 of them have a little bug, though, so must wait. How can pick 2 of them for my project?

解决方案

The ideal solution would be to leave a comment asking for the contributor to submit again his/her pull request with only the 2 commits, in order for you to apply said PR (pull request) without having to do any work.

The other solution, from the page "Merging Pull Request", is to merge locally, on your local clone, in a dedicated branch.
You can then cherry-pick the right commits you want, and push those back to your repo, but make sure to leave a comment in the discussion section of the pull request explaining that

  • you only took 2 of the 5 commits into account,
  • the contributor should rebase his work on top of your new updated master (which now includes said 2 commits), and re-submit the same pull request with the last (and hopefully fixed) 3 commits.

This is similar to the first option, except you don't have to wait for the fixes: you can grab what you want locally, test and push.

这篇关于如何在GitHub上从5个提交请求中选择2个提交?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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