如果你不能提交给他们的分支,你如何将提交添加到另一个人的github pull请求到你的repo中? [英] How can you add commits to a github pull request of another person to your repo if you can't commit to their branch?
问题描述
以下是这种情况:
我有一个公共仓库 A 。 A ,向 Bob / master
添加一些提交,并提交一个pull请求合并 A /主
。在将它合并回 A / master
之前,我想对提出的pull请求进行一些更改。
如果我无法推送到 Bob / master
?
您可以在此处使用多种工作流程。一些示例如下:
-
对拉请求进行评论,并让Bob进行一些更改。有关详情,请参阅合并请求讨论。
-
将拉取请求合并到不同的分支,然后在合并到主设备之前进行更改。您需要从命令行执行此操作;请参阅合并合并请求以了解分步说明。 在使用
git am
之前修改补丁。请参阅修补程序和应用程序。这可能是最灵活的选择,但也是最手动的。git checkout master
curl http:// github.com/<username> /<project_name> /pull/<patch_number> ;.patch
sensible-editor< patchfile>
git am< patchfile>
git push origin master
Here's the scenario:
I have a public repo A. Bob forks A, adds a few commits to Bob/master
and submits a pull request to merge those changes in A/master
. I'd like to make a few changes to the proposed pull request before merging it back to A/master
.
How can I do that if I can't push to Bob/master
?
There are a number of workflows you can use here. Some examples are:
Comment on the pull request, and have Bob make some changes. See Pull Request Discussion for more info.
Merge the pull request onto a different branch, then make your changes before merging to master. You need to do this from the command line; see Merging a Pull Request for step-by-step instructions.
Edit the patch before applying it with
git am
. See Patch and Apply. This is probably the most flexible option, but also the most manual.git checkout master curl http://github.com/<username>/<project_name>/pull/<patch_number>.patch sensible-editor <patchfile> git am <patchfile> git push origin master
这篇关于如果你不能提交给他们的分支,你如何将提交添加到另一个人的github pull请求到你的repo中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!