Skip to content

Instantly share code, notes, and snippets.

@mckernanin
Created September 1, 2021 14:57
Show Gist options
  • Save mckernanin/1d19e7d434554535ffe5cb8bf97d02c1 to your computer and use it in GitHub Desktop.
Save mckernanin/1d19e7d434554535ffe5cb8bf97d02c1 to your computer and use it in GitHub Desktop.
#!/bin/bash
COMMITS=$(git cherry -v main $1 | cut -d " " -f 2)
for COMMIT in $COMMITS
do
git checkout $COMMIT
./script.sh
if [ $? -eq 0 ]
then
echo $COMMIT passed
else
echo $COMMIT failed
fi
done
git checkout $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment