Skip to content

Instantly share code, notes, and snippets.

@Jildor
Forked from ebouchut/multi_cherry_pick
Created July 30, 2017 14:21
Show Gist options
  • Save Jildor/e32325d86177415b4244936202a0c182 to your computer and use it in GitHub Desktop.
Save Jildor/e32325d86177415b4244936202a0c182 to your computer and use it in GitHub Desktop.
Cherry pick multiple commits
Cherry pick the commits from a through z (assuming SHA1 a is older than z)
git rev-list --reverse --topo-order a^..z | xargs -n 1 git cherry-pick
The below code does not work as it will squash all the commits (a..z) in a single one.
git cherry-pick a..z
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment