From 86674ddc28f54e1bb7b77573a2672bc50b1ef471 Mon Sep 17 00:00:00 2001
From: Fabio Manganiello <fabio@manganiello.tech>
Date: Sun, 26 May 2024 01:26:19 +0200
Subject: [PATCH] [CI/CD] Do a git fetch beofre checkout/rebase in
 sync-stable-branch.

---
 .drone/sync-stable-branch.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/.drone/sync-stable-branch.sh b/.drone/sync-stable-branch.sh
index dfdb63173..7245652d0 100755
--- a/.drone/sync-stable-branch.sh
+++ b/.drone/sync-stable-branch.sh
@@ -7,12 +7,13 @@
 # Git configuration
 git remote rm origin
 git remote add origin git@git.platypush.tech:platypush/platypush.git
+git fetch origin
 
 # Merge and push to the `stable` branch
 git checkout stable || git checkout -b stable
-git rebase origin master
+git rebase master
 git push -u origin stable
-git checkout origin master
+git checkout master
 
 # Restore the original git configuration
 mv "$TMP_GIT_CONF" "$GIT_CONF"