Skip to content

Instantly share code, notes, and snippets.

@jacius
Created August 11, 2009 02:16
Show Gist options
  • Save jacius/165586 to your computer and use it in GitHub Desktop.
Save jacius/165586 to your computer and use it in GitHub Desktop.
Cherry pick a range of git commits.
#!/bin/sh
#
# A very simple shell script to "cherry pick" a range of commits in Git.
# I might add more features later, like validation.
#
# Credit goes to Alex Riesen:
# http://www.nabble.com/cherry-pick---since---td10105685.html
#
# This script is released to the public domain. You can do whatever you want with it.
git format-patch --stdout --binary --full-index -k $1 | git am -k -3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment