侧边栏壁纸
博主头像
会飞的大象博主等级

爱运动的程序猿

  • 累计撰写 126 篇文章
  • 累计创建 158 个标签
  • 累计收到 0 条评论
标签搜索

目 录CONTENT

文章目录
git

git切换分支

会飞的大象
2021-07-29 / 0 评论 / 0 点赞 / 926 阅读 / 0 字
  1. 查看远程分支

$ git branch -a
我在mxnet根目录下运行以上命令:

~/mxnet$ git branch -a
* master
  remotes/origin/HEAD -> origin/master
  remotes/origin/master
  remotes/origin/nnvm
  remotes/origin/piiswrong-patch-1
  remotes/origin/v0.9rc1

  1. 查看本地分支
~/mxnet$ git branch
* master
  1. 切换分支
$ git checkout -b v0.9rc1 origin/v0.9rc1
Branch v0.9rc1 set up to track remote branch v0.9rc1 from origin.
Switched to a new branch 'v0.9rc1'

#已经切换到v0.9rc1分支了
$ git branch
  master
* v0.9rc1

#切换回master分支
$ git checkout master
Switched to branch 'master'
Your branch is up-to-date with 'origin/master'.

0

评论区