git cherry-pick

Hierarchy:

Categories

Tags:

Updated 2023-05-24

Quick and dirty guide:

  1. Checkout the branch you want to merge your work into
  2. Create a new fresh branch off of that. Something like merge/featurename
  3. 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
  4. Run git cherry-pick [hash] for each of the commits, in historical order
  5. Open a PR for merge/featurename into the branch you want to merge your work into

Related Posts