Skip to content

Instantly share code, notes, and snippets.

@mafernando
Last active July 6, 2016 16:37
Show Gist options
  • Save mafernando/d58c6fc2c9011f11c1c5 to your computer and use it in GitHub Desktop.
Save mafernando/d58c6fc2c9011f11c1c5 to your computer and use it in GitHub Desktop.
Useful Git Commands
@mafernando
Copy link
Author

320
down vote
accepted
Git 1.7.2 introduced the ability to cherrypick a range of commits. From the release notes:

git cherry-pick" learned to pick a range of commits (e.g. "cherry-pick A..B" and "cherry-pick --stdin"), so did "git revert"; these do not support the nicer sequencing control "rebase [-i]" has, though.
Including important comments (credits to respective authors)

Note 1: In the "cherry-pick A..B" form, A should be older than B. If they're the wrong order the command will silently fail. – damian

Note 2: Also, this will not cherry-pick A, but rather everything after A up to and including B. – J. B. Rainsberger

Note 3: To include A just type git cherry-pick A^..B – sschaef

http://stackoverflow.com/questions/1670970/how-to-cherry-pick-multiple-commits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment