Git · Branches and merges

git branch -D (force delete)

Force-deletes a branch, even with unmerged commits.

Syntax
git branch -D <branch>

Example

Example
git branch -D spike/old

More in this group

git branch --merged git branch -d git branch -m git checkout -b git cherry git merge --ff-only git merge --no-commit git merge --squash

Learn this in the course

Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.

Open the course