-
-
Save yfr/1aee9ba2fc09aa619bff to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
git stash list | |
echo | |
read -p "Do you want to drop all these stashes? [y|n]" -n 1 confirmation | |
echo | |
case "$confirmation" in | |
n|N) exit 0;; | |
esac | |
echo | |
echo "Dropping whole git stash" | |
echo | |
stashes=$(git stash list | wc -l) | |
for index in $(seq 1 $stashes) | |
do | |
git stash drop | |
done | |
echo | |
echo "Dropped whole git stash" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment