Back

Explore Courses Blog Tutorials Interview Questions
+1 vote
3 views
in DevOps and Agile by (29.3k points)

Hi I am working on git how to clone branches into local feature1,feature2,master all 3 branches i have clone the same structure in git hub 

1 Answer

0 votes
by (50.2k points)
To clone a specific branch of git to your local machine you could use: 
git clone -branch

The -branch argument lets you specify a specific branch to clone instead of the branch the remote HEAD is pointing to, usually the master branch.

For example:


git clone -branch new_feature git://remoterepository.git

Related questions

0 votes
1 answer
+7 votes
1 answer
asked Jul 29, 2019 in DevOps and Agile by Han Zhyang (19.7k points)
0 votes
1 answer
+1 vote
1 answer

Browse Categories

...