Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
3 views
in DevOps and Agile by (27.5k points)

I am new to git version control and I dont know how to clone / pull a specific branch of a repo . Trying to get the branch master of the project, but it defaults to branch test_1

I have tried using the command git clone but it grabbed default test_1. I have also tried reading other questions but the commands are confusing me and I dont want to break anything.

How do i clone the master branch of this project so i can make changes and push to it?

1 Answer

0 votes
by (27.5k points)

This simple code should do the magic:

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

Related questions

Browse Categories

...