git的常用命令

查看分支

Administrator@samueltao MINGW64 /f/mamahao/spring-framework (3.2.x)
$ git branch -a
* 3.2.x
  master
  remotes/origin/3.0.x
  remotes/origin/3.1.x
  remotes/origin/3.2.x
  remotes/origin/4.0.x
  remotes/origin/4.1.x
  remotes/origin/4.2.x
  remotes/origin/4.3.x
  remotes/origin/HEAD -> origin/master
  remotes/origin/beanbuilder
  remotes/origin/conversation
  remotes/origin/gh-pages
  remotes/origin/master
  remotes/origin/update-stomp-reactor-netty

Administrator@samueltao MINGW64 /f/mamahao/spring-framework (3.2.x)
$ git branch
* 3.2.x
  master

结论

  • git branch -a查看远程分支

  • git branch查看本地分支

  • git checkout -b 3.2.x origin/3.2.x切换分支

  • git checkout master 切回master

更新别人的分支,fork

https://i.cnblogs.com/EditPosts.aspx?postid=8762849

posted @ 2018-04-09 21:01  谢幕ゾ华丽  阅读(128)  评论(0编辑  收藏  举报