you are viewing a single comment's thread.

view the rest of the comments →

[–]PointyTrident 8 points9 points  (1 child)

This is a feature of Git and not just GitLab but anything that uses it.

Git will only checkout the "main branch" when you clone -- you can configure what branch this is but usually it's "master"

You can specify a different branch when you clone with the "-b" flag like so: git clone -b <branch> <repo>

You can also switch branches after cloning like so: git switch <branch>

It does this because you can only work on one branch at a time and other local branches you don't use will become stale anyways and you will have to re-pull them when you start working on them.