Git – Cherry pick a single commit for pull request

You need to create a fresh branch from the remote HEAD, cherry-pick the commit to that branch, push the branch to your repo on GitHub, then create a pull request.

git checkout -b mybranch
git fetch upstream
git reset --hard upstream/master
git cherry-pick <commit-hash>
git push origin mybranch:mybranch

Leave a Comment