Skip to content

Instantly share code, notes, and snippets.

@steadystatic
Created November 5, 2015 18:32
Show Gist options
  • Save steadystatic/1266a8791e838f3e4b74 to your computer and use it in GitHub Desktop.
Save steadystatic/1266a8791e838f3e4b74 to your computer and use it in GitHub Desktop.
Quick script for when you have to cherry pick a bunch...
#!/bin/bash
#Use cautiously, cherry picks can end up in merge conflicts...and cherry-pick --continue abort etc.
#Array of SHAs to cherry pick
shas=("6736214" "6364c9c" "b25a80e" "6af051f" "571bf75" "5099a13" "c2caa98")
#Array length
shasLength=${#shas[@]}
for (( i=0; i<${shasLength}; i++));
do
echo "Cherry picking" ${shas[$i]}
git cherry-pick ${shas[$i]}
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment