Answers for "git checkout a branch remota"

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

Code answers related to "git checkout a branch remota"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language