How to check out a remote branch in git

John John (304)
1 minute

If you're working on your development environment but you need access to a branch that someone else has pushed to "origin" then you'll need to follow these steps.

If you need to list all of of the remote branches in Git, check out our guide to get started.

git×1

Howchoo is reader-supported. As an Amazon Associate, we may earn a small affiliate commission at no cost to you when you buy through our links.

You must fetch origin to get all of the remote branches that are available. To fetch origin simply move to your working directory and type:

git fetch origin

The easiest way to get the remote branch is by checking it out. To do so simply type:

git checkout -b branch_name origin/branch_name
This will checkout the remote branch called branch_name into a local branch with the same name.

If you found this guide useful, you may also be interested in our guide on how to commit and push in Git.

Network trouble? You might need a factory reset.
Ash Ash (362)
5 minutes

If you need to reset your ASUS router or modem, you've got a couple of options. While most devices rely on a factory reset button, ASUS provides an addition web-based option.