Question

As a newbie to Github, I've just submitted a pull request. The owner of the project is pretty happy with my additions but they're not quite perfect and need a bit of changing.

How do I proceed from here? Do I need to close the current pull request and submit a new one? Or is there a way of amending one?

Also is it preferable to reset my branch and make the required changes from scratch, or make another commit to my branch to amend the changes on top of my previous changes?

Was it helpful?

Solution

Once you create a pull request, if you look near the bottom of the issue it creates, there is a message which mentions that if you push more commits to the branch you've made the request on, they'll be appended to the pull request.

All additional commits pushed to the same branch become part of that pull request. The reason for that is due to the way a pull request works. You can think of it as the person accepting the pull request as pulling the current state of that branch at the moment they decide to merge, rather than creating a set of changes and asking for that to be accepted.

OTHER TIPS

disclaimer: This is about behavior they have on github, not the social practice.

Before get merged, a pull request is identified by related repos and branches, not the commits.

That means you can modify the branch as you want, like adding one more commit or rebase-ing it onto latest base, and the modifications will be merged with the same pull-request.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top