git branch

https://git-scm.com/docs/git-branch

 

git branch命令的-r选项,可以用来查看远程分支,-a选项查看所有分支。

zuo@DESKTOP-QN47U5R MINGW64 /d/b/test (iyy)
$ git branch
  i22
  i33
  i44
  iuu
  ixx
* iyy

zuo@DESKTOP-QN47U5R MINGW64 /d/b/test (iyy)
$ git branch -a
  i22
  i33
  i44
  iuu
  ixx
* iyy
  remotes/origin/HEAD -> origin/i22
  remotes/origin/i22
  remotes/origin/i33
  remotes/origin/i44
  remotes/origin/i55
  remotes/origin/i66
  remotes/origin/i77

zuo@DESKTOP-QN47U5R MINGW64 /d/b/test (iyy)
$ git branch -r
  origin/HEAD -> origin/i22
  origin/i22
  origin/i33
  origin/i44
  origin/i55
  origin/i66
  origin/i77

 

上面命令表示,本地主机的当前分支是master,远程分支是origin/master

posted @ 2018-08-06 22:17  骑者赶路  阅读(148)  评论(0编辑  收藏  举报