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
?
Open the issue or pull request that you want to assign to someone. If no one is assigned to an issue or pull request, click assign yourself to assign yourself. In the right side menu, click Assignees. To assign the issue or pull request to a user, start typing their username, then click their name when it appears.
In order to push your branch to another remote branch, use the “git push” command and specify the remote name, the name of your local branch as the name of the remote branch. As an example, let's say that you have created a local branch named “my-feature”.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With