How to clone just a single branch from a remote

If you have ever felt a need to keep a copy of dif­fer­ent branches in dif­fer­ent direc­to­ries, you prob­a­bly want to clone only the branch you want a copy of. This sim­ple git com­mand lets you do just that.

git clone -b mybranch whatever.git

Ryan Sukale

Ryan is a UX engineer living in San Francisco, California.

You may also like...

Leave a Reply

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