natman
0
Q:

git checkout branch

// create and checkout new branch in one line
git checkout -b new_branch
3
$ git checkout -b <branch_name>
0
# In modern versions of Git, you can checkout the remote branch like a local branch.
git checkout <remotebranch>

# Older versions of Git require the creation of a new branch based on the remote.
git checkout <remotebranch> origin/<remotebranch>
7
$ git checkout -b myfeature dev
2
git checkout -b origin/branch-name
git checkout -b branch-name
2
git checkout -b <new-branch>
1
truelover@PEACE project % git checkout master
truelover@PEACE project % git checkout branch_name
#create branch
truelover@PEACE project % git checkout -b new_branch_name
5
$ git checkout -b new-branch --track origin/develop
1

New to Communities?

Join the community