How can I delete all git branches which have been merged?显示如何删除已合并的分支。然而,在GitHub中,现在有一个"壁球和合并"和" Rebase并合并"选项,git branch --merged
未检测到这两个选项。
如果合并到master中,有没有办法识别基本上生成空提交的所有分支?
编辑:通过CLI寻找编程方式,类似于链接问题。答案 0 :(得分:0)
您可以将其他分支与master
进行比较。如果找不到差异,则删除分支。
$ git checkout master
$ git branch
$ git diff HEAD..branch1 # see what is in 'branch1' that is not in 'master' branch
# if no difference found then delete the branch
$ git branch -D branch1
答案 1 :(得分:0)