Created
June 12, 2013 16:35
-
-
Save rais38/5766980 to your computer and use it in GitHub Desktop.
Create patch from 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
git stash show -p stash@{0} > Stash0.patch |
Won't work from a PowerShell terminal because of the curly braces. The workaround is to wrap stash@{0}
in quotes. I.e.,
git stash show -p "stash@{0}" > Stash0.patch
Thanks!
very cool. tks.
And to apply the patch, git apply path/to/Stash0.patch
If you have new files (untracked) in stash it won't print these files to patch.
To fix it add flag -u
git stash show -u -p stash@{0} > Stash0.patch
wonderful!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks!