Delete Local Branch
This is how you can delete a local branch:
git branch (-d | -D) [-r]
branchname will be deleted if you use a -d or -D option.
You can delete one or more than branch using the command above.
Note that if a branch has a reflog then that will also be deleted.
You can use -r and -d together to delete remote-tracking branches.
Delete one branch
This command will delete one branch named “test” with force.
git branch -D test
Delete multiple remote branches
Make sure to configure the fetch or pull otherwise they will create the branches again.
git branch -d -r origin/abc origin/xy origin/zzz
-d is the shortcut for –delete
-D is the shortcut for –delete –force
-r is the shortcut for –remotes
Read more about it on Git-Scm
branch command-line delete git local development