Skip to content

Instantly share code, notes, and snippets.

@mourawaldson
Forked from VersionMismatch/stashExporter
Created November 7, 2017 18:14
Show Gist options
  • Save mourawaldson/4ffa9109c130e904db6130e67135a959 to your computer and use it in GitHub Desktop.
Save mourawaldson/4ffa9109c130e904db6130e67135a959 to your computer and use it in GitHub Desktop.
Export git stashes to patch files using the stash name as the file name
git stash list| sed 's/\//\_/g'|sed 's/ /\_/g' | awk -F ":" '{ system("git stash show -p " $1 " >> " $1$2$3 ".diff" ) }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment