Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

How do I check out a remote Git branch?

In this case, you probably want to create a local test branch which is tracking the remote test branch:

$ git branch test origin/test
In earlier versions of git, you needed an explicit --track option, but that is the default now when you are branching off a remote branch.

To create the local branch and switch to it, use:

$ git checkout -b test origin/test
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #How #I #check #remote #Git
ADD COMMENT
Topic
Name
9+9 =