Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

git checkout remote branch

# In order to checkout a remote branch,
# you have to first fetch the contents of the branch
git fetch --all

# In mordern version of Git, cehckout the remote branch like a local branch
git checkout <remotebranch>

# Older versions of Git requiers the creation of a new branch based on the remote
git checkout -b <remotebranch> origin/<remotebranch>
 
PREVIOUS NEXT
Tagged: #git #checkout #remote #branch
ADD COMMENT
Topic
Name
1+5 =