1
0
Fork 0
forked from mCaptcha/website

feat: stash changes before checkout

This commit is contained in:
Aravinth Manivannan 2023-10-21 14:50:42 +05:30
parent b79e6fa2ba
commit a1d1e7413d
Signed by untrusted user: realaravinth
GPG key ID: F8F50389936984FF

View file

@ -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