- clone 一个仓库后
- 默认是master分支
- 切换到develop分支:
切换到develop分支
zhangbin@LAPTOP-F1POBCSR MINGW64 /g/CDN/psdk (master)
$ git branch -a
* master
remotes/origin/HEAD -> origin/master
remotes/origin/develop
remotes/origin/master
zhangbin@LAPTOP-F1POBCSR MINGW64 /g/CDN/psdk (master)
$ git checkout origin develop
error: pathspec 'develop' did not match any file(s) known to git
zhangbin@LAPTOP-F1POBCSR MINGW64 /g/CDN/psdk (master)
$ git checkout -b develop remotes/origin/develop
Updating files: 100% (8562/8562), done.
Switched to a new branch 'develop'
Branch 'develop' set up to track remote branch 'develop' from 'origin'.
zhangbin@LAPTOP-F1POBCSR MINGW64 /g/CDN/psdk (develop)
$