分支为合并前需要删除的情况
nelsen-mac:learngit mac$ git checkout -b a1
M readme.md
Switched to a new branch 'a1'
nelsen-mac:learngit mac$ git add readme.md
nelsen-mac:learngit mac$ git commit -m'will be del'
[a1 b9a8222] will be del
1 file changed, 4 insertions(+), 4 deletions(-)
切换master分支,删除a1分支
nelsen-mac:learngit mac$ git branch -d a1
error: The branch 'a1' is not fully merged.
If you are sure you want to delete it, run 'git branch -D a1'.
删除失败,根据提示执行git branch -D a1即可以删除
本系列笔记参考:https://www.liaoxuefeng.com/wiki/896043488029600/1216289527823648