欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  科技

git操作:查看分支、删除本地分支和远程分支

程序员文章站 2022-07-27 15:06:17
1、查看本地分支:git branch 2、查看远程分支:git branch -r 或 git branch --remote 3、查看本地和远程的所有分支:git branch -a ......

1、查看本地分支:git branch

2、查看远程分支:git branch -r 或 git branch --remote

3、查看本地和远程的所有分支:git branch -a

4、删除本地分支:git branch -d <分支名称>,删除之前,记得切换到其他分支上

5、强制删除本地分支:git branch -d <分支名称>

6、删除远程分支:git push origin --delete <分支名称>