Last active
October 16, 2016 11:21
-
-
Save mhoyer/e821df0bc9921438028da2944d50bf1f 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
function stashed-git-command() { | |
if ! git diff --exit-code -s ; then | |
echo " >>> stashing" | |
git stash | |
stashpop=true | |
fi | |
$* && [ $stashpop ] && \ | |
echo " <<< unstashing" && \ | |
git stash pop | |
stashpop= | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment