Last Updated: February 25, 2016
·
639
· jesseobrien

Clone Specific Branch and Rename Remote

Sometimes we may want to clone a specific branch in git and at the same time rename the remote we're cloning from to something else, like upstream.

git clone -b <branch> -o <remote-name> git://github.com/user/repo <folder>