Reputation: 2133
How does one deal with submitting a new pull request after a previous one was declined?
For example, I forked a repository, made some changes to my fork, then submitted the changes in the form of a pull request. These were declined for the time being, but the authors say they might include them in the future. Now, I've made more changes to my forked repo and would like to resubmit these new changes in the form of a pull request, but whenever I do this, the old changes are automatically included as well. Is it possible to submit on the newer additions and keep the older ones away?
If they weren't considering my first additions for future versions, I would just delete my repo and start new, since there hasn't been much added to it.
Thanks
Upvotes: 0
Views: 252
Reputation: 83537
When you are working on a project, you should always create a new branch for each set of changes that you want to make. This allows you to submit pull requests which only contain specific changes. If you have already been committing to the master branch of your fork or all of your commits are on a single branch, you should first create a new branch at the same commit as the original repo's master
branch for each set of changes. Then you can use git cherry-pick
to copy specific commits onto a specific branch. Once you get all of the changes you want to submit on a single branch, then you can create a new PR without the changes which were previously declined.
Upvotes: 1