Last active
February 5, 2025 11:45
-
-
Save jancimajek/7ad581743fb0356b5731604d0fe2f794 to your computer and use it in GitHub Desktop.
Back up stash
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
# Backup stash messages/titles | |
git stash list > stashes.txt | |
# Create patch for each stash entry | |
NUM_STASHES=$(git stash list | wc -l); for ((i = 0; i < $NUM_STASHES; i++)); do git stash show $i -u -p > stash-$i.patch; done; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment