git branch -D <branchname>
Delete a branch forcefully
The git branch -D <branchname>
command is used to delete a local branch forcefully.
This command permanently deletes the specified branch from the repository, even if it contains unmerged changes.
It is useful when you want to clean up your local branches after they have been merged or no longer needed. The -D
flag is a shortcut for --delete --force
.