To build your pipelines, you may need the name of the branch on which the pipeline is running. In most cases, the predefined variables CI_COMMIT_BRANCH
or CI_COMMIT_REF_NAME
can be used for this. According to GitLab Docs:

Our team maintained a large Mercurial (Hg) monorepo containing 3 significant projects and several smaller ones, with an 8-year history and approximately 30,000 commits.We set a goal to split the monorepo into multiple separated repositories and migrate each to Git with saving all the history. The goal looked unreachable, but the solution appeared to be quite simple.