Git创建远程分支

## 1、在当前分支下(一般是master分支),创建muscleape的本地分支分
$ git checkout -b muscleape
Switched to a new branch 'muscleape'

## 2、将muscleape分支推送到远程
$ git push origin muscleape
Everything up-to-date

## 3、将本地分支muscleape关联到远程分支muscleape上  
$ git branch --set-upstream-to=origin/muscleape
......
......
......
Branch 'muscleape' set up to track remote branch 'muscleape' from 'origin'

## 4、查看本地分支和远程分支的映射关系
$ git branch -vv
muscleape         f938a3d8e9 [origin/muscleape: gone] 测试test

## 5、查看远程分支
$ git branch -r
origin/muscleape

## 6、查看本地各个分支目前最新的提交
$ git branch -v
muscleape         f938a3d8e9 测试test

## 7、查看远程各个分支目前最新的提交
$ git branch -r -v
origin/muscleape         f938a3d8e9 测试test

## 8、查看所有分支情况
$ git branch -a

*
muscleape
master
remotes/origin/muscleape
remotes/origin/master


posted @ 2022-09-07 11:33  冥想心灵  阅读(297)  评论(0编辑  收藏  举报