diff --git a/scripts/update.sh b/scripts/update.sh
index 8aa987315a65813b0d6b589842741f5425c94b4b..fcdff3a9ff77abcfab1ee7a85bc3bd45fb6dd79a 100755
--- a/scripts/update.sh
+++ b/scripts/update.sh
@@ -16,5 +16,8 @@ for module in $GLUON_MODULES; do
 	git init
 	git config commit.gpgsign false
 
-	git branch -f base $commit 2>/dev/null || git fetch -f $repo $branch:base
+	if ! git branch -f base $commit 2>/dev/null; then
+		git fetch $repo $branch
+		git branch -f base $commit 2>/dev/null
+	fi
 done