git cherry-pick

Quick and dirty guide:

Checkout the branch you want to merge your work into

Create a new fresh branch off of that. Something like merge/featurename

Open the GitHub.com PR screen and open the PR screen for the branch your work is on and copy the hashes for the commits you want to cherry-pick

Run git cherry-pick [hash] for each of the commits, in historical order

Open a PR for merge/featurename into the branch you want to merge your work into