git clone current branch code example
Example 1: how to clone a specific branch from github that you are not working
git clone -b <branch> <remote_repo>
Example 2: gitlab clone branch
git clone --single-branch --branch <branchname> <remote-repo>