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

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 <分支名称>

猜你喜欢

转载自www.cnblogs.com/x00479/p/11269158.html