How to clone a specific git branch only

To clone a specific remote git branch only, you could use:

git clone --single-branch -b testing https://gitlab.com/techantidote/dotfiles.git

Remote Branch cloned: testing
Git URL: https://gitlab.com/techantidote/dotfiles.git

Source: StackOverFlow

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.