git branch -D 大写的D 删除分支

Posted ISaiSai

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了git branch -D 大写的D 删除分支相关的知识,希望对你有一定的参考价值。

今天删除本地分支 git branch -d XX 提示:  the branch  XXX is not fully merged

原因:XXX分支有没有合并到当前分支的内容


解决方法:使用大写的D 强制删除  git branch -D XXX   


另外不能删除当钱checkout 的分支


其它:删除远程分支 需要切换到其它分支之后删除当前分支

否则会:error:cannot delete the branch 'XXX' which you are currently on



删除远程分支:

git push origin  :XXXX

 


以上是关于git branch -D 大写的D 删除分支的主要内容,如果未能解决你的问题,请参考以下文章

Git 远程删除分支后,本地 git branch -a 依然能看到的解决办法

错误记录Git 使用报错 ( git branch -a 仍能查询到已经删除的远程分支 )

错误记录Git 使用报错 ( git branch -a 仍能查询到已经删除的远程分支 )

在gitlab上删除分支后,本地git branch -r还能看到

git branch 常用语句详解

git-推送分支