1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-12-18 10:22:00 +00:00

updater: add --autostash to git pull (#7172)

If I have custom configs (like theme customizations) I have to stash my changes and get them back after the update. 

By adding the --autostash on upgrade.sh, if I have any changes not commited they'll be reapplied after the upgrade, allowing me to have temporary customizations without any harm to the upgrade process.
This commit is contained in:
Mauricio Wolff 2020-02-28 03:06:20 +11:00 committed by GitHub
parent 6cb8ff391d
commit bccfe1389c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -38,7 +38,7 @@ if [ -n "$remote" ]; then
fi
printf "${BLUE}%s${NORMAL}\n" "Updating Oh My Zsh"
if git pull --rebase --stat origin master
if git pull --rebase --autostash --stat origin master
then
printf '%s' "$GREEN"
printf '%s\n' ' __ __ '