Pull request feedback suggests small change. Do I create new commit and PR or update current PR?

I submitted a pull request to a project and received good code review feedback suggesting a minor change.

Should I implement the change in my branch (in my fork), commit into my branch, merge into my master, then submit a completely new pull request back to the project?

Or, am I supposed to update the current pull request somehow?

Edit: In the future, should I submit my code for review prior to submitting a pull request?

Thank you!

-John

It depends a bit on the project you have the pull request open to, but typically you make the change on whathever branch you were on when you made the changes you opened the PR with, push those chagnes to your branch, and the pull request is autmatically updated.

In all of the projects I’m involved with, we prefer code review to happen in a pull request (i.e. no review before that). If you are thinking about adding a major feature I’d ask the project maintainers what they prefer you do (we usually encourage people to an issue for discussion).

3 Likes