-2

How to clone the specific branch from GitLab repository.

jonrsharpe
  • 115,751
  • 26
  • 228
  • 437
  • 1
    That the specific remote is hosted on GitLab is irrelevant. – jonrsharpe Jun 09 '20 at 08:56
  • 1
    Does 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 Answers1

-1
git clone -b <branch-name> <remote_repository>
jonrsharpe
  • 115,751
  • 26
  • 228
  • 437
  • 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