When I do:
git pull --rebase --autostash
Sometimes I get a message that there was a conflict applying the stash and I\'ll need to merge it
With non-zero exit code you cannot distinguish pull
error from stash pop
error.
My advice is to avoid autostash. It seems convenient when it works but is problematic when it doesn't. And if you do things like
git stash push
git pull --rebase
git stash pop
you can create a bash script or a git alias:
git alias.pull-autostash '!git stash push && git pull --rebase && git stash pop'
Usage:
git pull-autostash