When we build without cache, we do this:
git clone project
cd project
git submodule update -f --init
When we build FROM cache, we start with the last copy of your repo (what was cloned; not what might have been created in that directory during build!) and then we do this:
cd project
git fetch -f -u remote ref
git checkout -f FETCH_HEAD
git submodule update -f --init
If that doesn’t bring the latest tags, you’ll want to pull them yourself during build. This article guides you in how you may access your repo during build: [Support Guide] How do I access private repositories in the build environment?