git branch -D feature-xyz

Category: Git - Core

git branch -D feature-xyz

Force delete a local branch regardless of merge status

Force-deletes a local branch even if it has unmerged commits. -D means 'force delete'. Use with caution.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.