压扁到只有一个“正确的”提交github pull请求 [英] Squash to only one "proper" commit for github pull request
问题描述
我在github上有一个repo,其他人(Bob,为了争辩)已经发布了pull请求。他的代码并不完美,所以我们经历了几轮加价。据我了解,他承诺并推动他对每一组标记变化的拉取请求。
因此,我的存储库看起来像这样:
master:--- o A(Chowlett
|
|
pull-req:o --- o --- o --- o
BCD(全部Bob)
提交SHA和msgs如下:
A:
123456良好提交< ; chowlett>
B:
777ccc修复小部件错误< bob>
p>
888ddd评论标记< bob>
999eee其他标记< bob>
我现在很高兴接受这个拉取请求,但我宁愿预标记版本不在我的回购中。实现以下所有内容;以及如何实现?
- 合并B,C& D作为单个提交进入我的回购
- 生成合并请求#99进入...提交以及
- 让github自动关闭pull request
请注意,Bob在制作时不必挤压他的提交GitHub PR。
自2016年3月起,您可以将该操作留给维护者(您)接受您的公关。
请参阅
I have a repo on github which someone else (Bob, for the sake of argument) has issued a pull request for. His code's not perfect, so we go through a few rounds of markups. As I understand it, he commits and pushes to his pull-request for each set of marked up changes.
So my repository now looks like this:
master: ---o A (Chowlett
|
|
pull-req: o---o---o---o
B C D (all Bob)
Commit SHAs and msgs are as follows:
A:
123456 Good commit <chowlett>
B:
777ccc Fix the widget bug <bob>
C:
888ddd Review markups <bob>
D:
999eee Further markups <bob>
I'm now happy to accept this pull request; but I'd rather the pre-markup versions weren't in my repo. Can I achieve all of the following; and how?
- Merge B, C & D into my repo as a single commit
- Generate the "Merge pull request #99 into ..." commit as well
- Have github automatically close the pull request
Note that Bob doesn't have to squash his commits when he is making a GitHub PR.
Since March 2016, you can leave that operation to the maintainer (you) accepting your PR.
See "Squash your commits" and its new documentation
This is a new option which lets you force commit squashing on all pull requests merged via the merge button.
这篇关于压扁到只有一个“正确的”提交github pull请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!