How to clone the specific branch from GitLab repository.
Asked
Active
Viewed 3,251 times
-2
-
1That the specific remote is hosted on GitLab is irrelevant. – jonrsharpe Jun 09 '20 at 08:56
-
1Does this answer your question? [How do I clone a single branch in Git?](https://stackoverflow.com/questions/1778088/how-do-i-clone-a-single-branch-in-git) – RMPR Jun 09 '20 at 09:24
1 Answers
-1
git clone -b <branch-name> <remote_repository>

jonrsharpe
- 115,751
- 26
- 228
- 437

Giridhar Reddy
- 45
- 1
- 5
-
While this code may answer the question, providing additional context regarding why and/or how this code answers the question improves its long-term value. I would recommend you to check SO's [official How to Answer article](https://stackoverflow.com/help/how-to-answer) along with the comprehensive [blog post](https://codeblog.jonskeet.uk/2009/02/17/answering-technical-questions-helpfully/) from [Jon Skeet](https://stackoverflow.com/users/22656/jon-skeet). – Aleksey Potapov Jun 09 '20 at 11:49