git 本地分支与远程分支相关操作记录

1、远程分支中有新增分支,但自己的本地分支没有对应同步

git checkout -b [remote-branch-name] origin/[remote-branch-name]

2. 查看本地分支与远程分支的关联(对应)关系

git branch -vv

3. 查看全部(本地、远程)分支

git branch -a

4. 删除本地分支

git branch -d [local-branch-name]

5. 删除远程分支

git push [git-url-name] -d [remote-branch-name]

// 例如:git push origin -d dev
原文地址:https://www.cnblogs.com/fanqshun/p/10550301.html