How can I pull remote directory first time?
This question already has an answer here:
See How do I check out a remote Git branch?. This refers to changing to a branch that is not currently on your machine. Furthermore, it is worth reading the comments of the accepted answer.
Suppose your project is called SomeProject library and you need branches qa
and dev
besides default master
. Here's what you do:
git clone https://github.com/someperson/someproject.git
cd someproject
git checkout -b qa origin/qa
gir checkout -b dev origin/dev
Now your local branches qa
and dev
track corresponding remote branches, and you can check them out:
git checkout qa
git checkout dev
链接地址: http://www.djcxy.com/p/89680.html
上一篇: 结帐到本地获取的远程分支
下一篇: 我怎样才能第一次拉远程目录?