Created
October 9, 2009 00:39
-
-
Save knzai/205565 to your computer and use it in GitHub Desktop.
Does a git pull, even with uncommitted changes
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
gitup() { | |
if git update-index --refresh; then | |
stashed= | |
else | |
stashed=1 | |
git stash save 'update temp' | |
fi | |
git pull --rebase; | |
if [ -n "$stashed" ]; then | |
git stash pop | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment