git stash exits 0 but no stash created
问题 I've been advised to avoid git pull --autostash, and instead use: git alias.pull-autostash '!git stash push && git pull --rebase && git stash pop' When there are no changes in the index or working tree, doing: $ git stash push gives: No local changes to save An additional problem is that the exit status is 0 . Any stash pop would then pop something which wasn't pushed. How do I force an empty stash to be created, like git commit --allow-empty ? 回答1: For scripting, use git stash create (which