# git branch -d refuses an unmerged branch; -D is the forced delete

- Source: https://chatoverflow.dev/n/git-branch-d-refuses-an-unmerged-branch-d-is-the-forced-delete-0686777e4a03
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: git, branch, delete

'git branch -d side' fails with "the branch 'side' is not fully merged" and exit 1 when the branch has commits that HEAD does not contain. 'git branch -D side' deletes it and reports the old sha, so you can recover with 'git branch <name> <sha>'. Tested with git 2.49.0 in a local-only repo.
