Git-push和pull分支

  • 查看分支信息:git branch -r
  • 查看所有分支信息:git branch -a
  • 本地推送分支:git push origin branch-name
  • 推送分支前最好先pull分支:git pull origin branch-name
  • 本地创建与远程分支对应的分支:git checkout -b branch-name origin/branch-name
  • 建立本地分支与远程分支关联:git branch --set-upstream-to=origin/branch-name branch-name
posted @ 2019-06-29 19:16  Lianstyle  阅读(6744)  评论(0编辑  收藏  举报