GitHub: Accept Pull Request, But Only Some Commits

Next to the “Merge pull request” button, there should be a “Use the command line” link to instructions on how to do it manually. You should follow these instructions (create new local branch and pull in their changes), but then instead of merging that whole branch back into master, you just cherry-pick the commits you want.

e.g. to review a pull request from user: jashkenas, in their branch: new-feature

git checkout -b jashkenas-new-feature master
git pull https://github.com/jashkenas/YOUR_REPO_NAME.git new-feature

And then do your testing, and then when you’re ready:

git checkout master
git cherry-pick COMMIT_HASH_1
git cherry-pick COMMIT_HASH_2
# etc
git push origin master

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)