Archive for the ‘Git’ Category

Checking out remote branch in Git

Simply blogging this for future reference and in the hope it will be useful for someone else.

To checkout a remote branch into your local use the following commands.

git clone myrepo@git.example.com
git branch -r

Will show you all the remote branches pick the one you like…

For instance for me it would be origin/dave.

Run the following command.

git checkout --track origin/dave