【git】切换分支

  • clone 一个仓库后
  • 默认是master分支
  • 切换到develop分支:

切换到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)
$
上一篇:git分支管理


下一篇:c++ TADOConnection TADOQuery TDataSetProvider TClientDataSet 动态创建