diff --git a/build.sh b/build.sh
index f5ef38f9fb847f1c4e3e89720a6c1b4d3e7e33e5..d4c7e757bad620818206c5a0cbe50d25a1dddd71 100755
--- a/build.sh
+++ b/build.sh
@@ -10,7 +10,8 @@ branch=$5
 with_gpu=$6
 
 echo "Trying to Fix the CI"
-rm -rf .git/modules/gdbgui/rebase-merge
+rm -rf .git/modules/*/rebase-merge
+git rebase --abort
 
 
 if [ x"$branch" == x"" ]; then