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

 

posted @ 2019-03-18 09:23  樊顺  阅读(241)  评论(0编辑  收藏  举报