fczfzq
Last Updated: June 15, 2016
·
32.9K
· fr0gs
Doggy

git checkout remote branch

git

In your workflow you'll often need to checkout and fetch branches from a remote repository to do code review of your colleagues for example.

Usage:

git checkout -b <local-branch> <remote-branch>
git fetch

So for example I have a branch called feature/abc remotely

git checkout -b feature/abc origin/feature/abc

There is also a shortcut for this command:

git checkout --track -b <remote-branch>
Say Thanks
Respond
Filed Under