且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何删除git中的本地分支?

更新时间:2023-02-02 15:07:49

如果您编辑分支&想删除它而不合并到你的主分支,你必须用 -D 选项强制删除它,而不是 -d $ c

$ p $ g $ git分支-D


I want to delete a local branch in Git but this failed:

git branch -d <branch_name>

If you edit your branch & want to delete it without merging it to your master branch, you have to force delete it with the option -D instead of -d.

git branch -D <branch_name>