Cherry pick multiple commits from a remote or upstream branch into your local branch.
Saw this from a comment on an answer on Stack Overflow
git fetch upstream git cherry-pick A^..B
A is the commit hash you want to start from (the
^ will include commit
A instead of starting at next commit after
B is the commit you want to end after being applied.
If you run into merge conflicts, it's a simple process of:
- manually fixing the merge conflicts
- committing your changes (you may need to do this several times if you use the
git add -p- this will walk you through your changes and allow you to stage chunks instead of whole files so your commit messages can be more verbose/useful.
- continue the cherry picking (
git cherry-pick --continue)