查看当前分支
git branch
查看所有分支
git branch -a
git branch -av
切换本地分支
git checkout master-dev
切换并创建本地分支
git checkout -b master-dev
创建本地分支 并指向远程分支
git checkout -b master-dev remotes/origin/master-dev
上传本地代码到远程分支 test(本地分支) feature/test(远程分支)
git push origin test:feature/test
把新分支推送到远程
git push origin br_name
删除远程分支 冒号代表删除
git push origin :br_name
网友评论