Let's say we have branch(es) on main repository and we want to fetch it/them to our mirror repository, how do we do it ?
-
Fetch the branch using this command !
$ git fetch https://gitlab.com/main/repository remote_branch_name:local_branch_name
-
Switch to new fetched branch !
$ git checkout local_branch_name
-
Push the new branch to the mirror repository !
$ git push origin local_branch_name