Q:

Migrating several branches to another Gitlab project

We've got a long-running Gitlab project (with accompanying git repository) that is now close to its finish.
This repository has about 400 branches.
I want to migrate some of those branches (2-5) to another project with another git repo and use them as a starting point.
What is the best way to do it?
I've read manuals for git clone --single-branch and git clone --branch but it is still not clear how this can help me when I've got more than one branch.
I could clone single branch from that repository, change remote and push.
Then, how can I add another single branch?
Gitlab is CE, version 11.0.2, installed from Omnibus package.

A:

Here is how I've managed to do it

Create a new empty repository
Add it to the old one as a new remote
For all desired branches: git push new_remote refs/heads/branch:refs/heads/branch
Clone new repo, make modifications according to a new project's tasks.

