How to clone a specific branch in git
In general:
git clone -b <branch> <remote_repo>
Example:
git clone -b develop git@github.com:user/myproject.git
Related protips:
Written by Dmitry Belaventsev
Related protips
5 Responses
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
·
Simple and Good.
Thanks!
over 1 year ago
·
Thanks
over 1 year ago
·
Thanks!)
over 1 year ago
·
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
khasinski
591.1K
dmichaelavila
500.4K
Related Tags
#git
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#