If you need to copy an already existing branch into a new or seperate repository just use this command:
cd ~/projects/
git clone --single-branch --branch <branchname> <remote-repo> project1
cd project1/
git branch
It will create a repo inside of projects/project1 inside your Home folder which contains a branch called <branchname> copied from <remote-repo>. This source <remote-repo> could be a remote reference (https..) but also a local folder.
Thanx to stackoverflow 😉
Good article. I’m experiencing some of these issues as well..