Send a pull request on GitHub for only latest commit

You need to basically create a new branch & cherry-pick the commits you want to add to it.

Note: you might need these before the checkout/cherry-pick commands

git remote add upstream <git repository>

git remote update

git checkout -b <new-branch-name> upstream/master

git cherry-pick <SHA hash of commit>

git push origin <new-branch-name>

Afterwards, you will see <new-branch-name> branch on github, switch to it and can submit the pull request with the changes you want.

Leave a Comment