git分支中删除分支

今天删除本地分支 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

猜你喜欢

转载自www.cnblogs.com/lixiangzheng/p/9012686.html