diff --git a/scripts/hugo.sh b/scripts/hugo.sh index 73ca418..cf15608 100755 --- a/scripts/hugo.sh +++ b/scripts/hugo.sh @@ -101,10 +101,12 @@ deploy() { if [[ -z $(git ls-remote --heads origin ${1}) ]] then echo "[*] Creating deployment branch $1" + git stash git checkout --orphan $1 else echo "[*] Deployment branch $1 exists, pulling changes from remote" git fetch origin $1 + git stash git switch $1 fi