这篇文章没有讲底层只是提供命令我觉得还不错给自己做一个笔记
删除本地分支命令:
git branch -d +分支名称来删除本地分支
如果发现删除不了,一般会有提示
如:
“error: The branch 'dev' is not fully merged.”
但是会有提示,按照提示来就行
“If you are sure you want to delete it, run 'git branch -D dev'.”
即:git branch -D dev
当然可能也有警告⚠️的情况:
warning: deleting branch 'xxxxxx' that has been merged to
'refs/remotes/origin/xxxxxx', but not yet merged to HEAD.
这种警告直接忽略
终极大招命令:
git branch --merged | egrep -v "(^\*|master)" | xargs git branch -d
已合并的都被删除了,没有的就去上面的强制删除吧。
原文链接:https://blog.csdn.net/weixin_42330218/article/details/125521412
标签:git,branch,删除,dev,本地,merged,分支 From: https://www.cnblogs.com/tcyweb/p/17097864.html