Skip to content

Instantly share code, notes, and snippets.

@knzconnor
Created October 9, 2009 00:39
Show Gist options
  • Save knzconnor/205565 to your computer and use it in GitHub Desktop.
Save knzconnor/205565 to your computer and use it in GitHub Desktop.
Does a git pull, even with uncommitted changes
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