New Git and Github user. Is it possible to accept/merge only part of a Pull Request?
For example if there is a Pull Request on Github that has 4 commits but you only want to use 2 of them, is there a way to simply merge the 2 and disregard the other 2?
No, the pull request is all or nothing. You can recreate the pull request by making a branch up to only the commits you need and merge that.
To accept the pull request, click the Pull Requests tab to see a summary of pending pull requests. If you are happy with the changes, click Merge Pull request to accept the pull request and perform the merge. You can add in a comment if you want. Once you click Merge Pull request, you will see a button Confirm merge.
Under your repository name, click Pull requests. In the "Pull Requests" list, click the pull request you'd like to merge. Depending on the merge options enabled for your repository, you can: Merge all of the commits into the base branch by clicking Merge pull request.
A pull request – also referred to as a merge request – is an event that takes place in software development when a contributor/developer is ready to begin the process of merging new code changes with the main project repository.
No, the pull request is all or nothing.
You can recreate the pull request by making a branch up to only the commits you need and merge that.
You can do this via
git cherry-pick
Or
git rebase -i
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