Clone a particular remote brach using git clone command


Git Clone branch cover

If you want to clone a remote repository in git, but you do not want to clone out the default master of the main branch from the origin, well you can do that using the following way,


Syntax:
git clone -b <branch_name> <remote_repo_url> 

Example:
% git clone us-east-1-branch https://github.com/code2care/CustomRatingBarExample.git
Git clone a specific branch from remote origin
-


Have Questions? Post them here!

Top Hashtags:

Advertisements

Advertisements




Advertisements