diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 6c731fcbfa9d6a4020a37a70ca1038815b2c3e93..e1ba5025621ba652605fa538d11db1b13af8e2e0 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -74,10 +74,10 @@ stages:
   -   git checkout devel
   -   git pull
   -   git checkout $WOLF_CORE_BRANCH
+  -   git pull
   - else
-  -   git clone ssh://git@gitlab.iri.upc.edu:2202/mobile_robotics/wolf_projects/wolf_lib/wolf.git
+  -   git clone -b $WOLF_CORE_BRANCH ssh://git@gitlab.iri.upc.edu:2202/mobile_robotics/wolf_projects/wolf_lib/wolf.git
   -   cd wolf
-  -   git checkout $WOLF_CORE_BRANCH
   - fi
   - mkdir -pv build
   - cd build
@@ -110,10 +110,10 @@ stages:
   -   git checkout devel
   -   git pull
   -   git checkout $WOLF_GNSS_BRANCH
+  -   git pull
   - else
-  -   git clone ssh://git@gitlab.iri.upc.edu:2202/mobile_robotics/wolf_projects/wolf_lib/plugins/gnss.git
+  -   git clone -b $WOLF_GNSS_BRANCH ssh://git@gitlab.iri.upc.edu:2202/mobile_robotics/wolf_projects/wolf_lib/plugins/gnss.git
   -   cd gnss
-  -   git checkout $WOLF_GNSS_BRANCH
   - fi
   - mkdir -pv build
   - cd build