Answers for "how to git clone a specific branch"

32

clone specific branch

git clone --single-branch --branch <branchname> <remote-repo>
Posted by: Guest on April-02-2020
5

git clone from specific branch

git clone -b branchName repoUrl
Posted by: Guest on December-07-2020
3

clone a given branch github

git clone --single-branch --branch <branch> <repository>
Posted by: Guest on April-28-2020
1

git clone specific branch only

git clone -b mybranch --single-branch git://sub.domain.com/repo.git
Posted by: Guest on December-14-2020
0

specific branch clone git

git clone -b <branch> <remote_repo>
git clone -b my-branch [email protected]:user/myproject.git
Posted by: Guest on July-26-2020
0

how to git clone a specific branch

# Using gh CLI

gh repo clone <username>/<reponame> -- -b <branchname>
Posted by: Guest on April-17-2021

Browse Popular Code Answers by Language