How do I clone all remote branches

Its very simple and easy to clone an object In this I will show you how can easily clone repository using cmd.

To clone an object using SSH use the following command.

git clone git@github.com:username/testRepo.git

Go into the git repo folder and check your current branch 

cd testRepo
git branch

//master

 

To clone an object using HTTPS use the following command.

git clone https://github.com/username/testRepo.git

Again go into the git repo folder and check your current branch 

cd testRepo
git branch

//master

 

Git Clone Remote Branches 

Once you done with clone repo go into the repo directory and see all remote branch using the git branch -a.

Then you need to checkout your desired Branch using git checkout. and start working their

 

 


Tags:

git

Share:

Related posts