I did some changes to a forked repo on Github and sent in a pull request. The owner had some small issues I have fixed now locally. How should I submit these fixes? When I just make a commit and push, will there be one more "fixed" commit within the pull request?
To keep it clean, I would like to rebase or amend my last commit and do a forced push, but what would happen then with the pull request? Will it be deleted automatically or just added (what I would like to happen)?
To edit a pull request, select the pull request on the Pull requests page, go to its detail page and click "Edit". The target branch (the base branch) and the pull request branch (the branch that will be merged) cannot be changed.
To edit a pull request, you push new changes into the same branch that was used for the pull request. Github will update everything else automatically.
While you can't undo a pull request, you can revert the merged commit from a pull request if necessary.
A pull request is made from the reference of a branch (and not from a particular commit).
So, every change you make in the branch (that is pushed to your repository) until the pull request is merged will be reflected in the pull request.
That's a clear design made by GitHub to make contribution easier, with commits that could be added following reviews and comments. That's even a recommended workflow to open the pull request early in the development (i.e. when the work is not finished) to start early reviews or discuss about some code (the draft
mode of a PR is for that).
There is no problem to amend a commit and do a --force-with-lease
(that should be preferred to --force
) since you are sure that you are the only one working in this branch, or you warn other developers beforehand or they know perfectly well how to handle the update (otherwise you will really bother the other developers)
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