Skip to content

Instantly share code, notes, and snippets.

@jordaaash
Last active September 22, 2015 23:53
Show Gist options
  • Save jordaaash/c894424fe69315e7dcdd to your computer and use it in GitHub Desktop.
Save jordaaash/c894424fe69315e7dcdd to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
for sha in `git rev-list HEAD..$1`; do
clear
git show --color $sha | less -XE
echo
while true; do
read -p "Do you wish to use this commit (y/n/q) ? " answer
case $answer in
[Yy]* ) git cherry-pick $sha;;
[Nn]* ) break;;
[Qq]* ) exit;;
* ) echo "Please answer yes, no, or quit.";;
esac
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment