git拉取dev

阅读更多
问题背景:

  新项目还在开发阶段,没有正式对外发布,所以开发同事合并代码到develop上(或者其他名称分支上),而不是到master分支上

  通过git拉取代码的时候,默认拉取的是master分支,如下图:





拉取指定分支代码解决方案:

以拉取develop分支的代码为例, 要拉取其余分支代码类似操作

1.使用git命令拉取

命令:git clone -b develop XXX

其中develop就是分支的名称


E:\test\test>git clone -b develop http://192.168.1.10/test/test.git
Cloning into 'test'...
fatal: Remote branch develop not found in upstream origin

E:\test\test>git clone -b dev http://192.168.1.10/test/test.git
Cloning into 'test'...
remote: Enumerating objects: 87, done.
remote: Counting objects: 100% (87/87), done.
remote: Compressing objects: 100% (62/62), done.
remote: Total 5270 (delta 14), reused 0 (delta 0)
Receiving objects: 100% (5270/5270), 768.53 KiB | 2.97 MiB/s, done.
Resolving deltas: 100% (2200/2200), done.

你可能感兴趣的:(git)