Answers for "Git - checkout a specific remote branch"

2

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>
Posted by: Guest on October-03-2021
2

Git - checkout a specific remote branch

$ git checkout -t origin/remote-branch

Branch 'remote-branch' set up to track remote branch 'remote-branch' from 'origin'.
Switched to a new branch 'remote-branch'
Posted by: Guest on April-23-2022
7

git checkout remote branch

git checkout --track origin/<branchname>
Posted by: Guest on June-17-2020
1

checkout remote git branch

git checkout -b test <name of remote>/test
Posted by: Guest on November-13-2021

Code answers related to "Git - checkout a specific remote branch"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language