y7hf6w
Last Updated: August 09, 2016
·
54.13K
· dizpers
3845a56

How to clone a specific branch in git

git

In general:

git clone -b <branch> <remote_repo>

Example:

git clone -b develop git@github.com:user/myproject.git

2 Responses
Add your response

22572

More than 2 years ago a --single-branch option was introduced: http://stackoverflow.com/questions/4811434/clone-only-one-branch/14930421#14930421

over 1 year ago ·
24694
0  m4sekwjgjys6imcrhgvgcd4gj0siwabymus7kg4frr2ijkuyhgst364ksl2qjcbjhhsckdzayluldbugojqckhnwyldldqboojmwljm8gktfrfituwcdl1eidwjud qbwmnafncda5

Simple and Good.

Thanks!

over 1 year ago ·