Last active
February 22, 2016 22:31
-
-
Save jrolfs/c1dd35eb7cf4c217cad7 to your computer and use it in GitHub Desktop.
Export all stashed Git states to patches
This file contains hidden or 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
for s in "${(@f)$(git --no-pager stash list)}"; do git stash show -p $(echo $s | awk -F": " '{print $1}') > "$HOME/Desktop/$(echo $s | awk -F": " '{print $2}' | tr ' ' '-').patch"; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment