How to clone only one branch from a repository

 

Git clones the master branch by default, sometimes need to copy a specific branch

git clone --single-branch --branch <branchname> <remote-repo>

 

comments are disabled for this article
Search
Popular Posts
Subscribe
{{post}}