How do I create and use a remote git branch?
This question already has an answer here:
Your git branch -a
told me that you have two remote branches origin/master
and origin/my_colleague
( origin/HEAD
really does not count). To checkout a local branch of origin/my_colleague
you can git checkout -b my_colleague origin/my_colleague
. This creates a new local branch, based on the origin/my_colleague
remote, and checks it out. To go back to master
(I know you are currently on master
because of the *
), you can git checkout master
.
上一篇: 我如何在git中创建一个新的分支?
下一篇: 我如何创建和使用远程git分支?