Git Cheat Sheet/Delete merged branch

Delete a merged local branch.

Section: Branching and Switching

Delete merged branch

bash
bash
git branch -d feature/my-change

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Branching and Switching
Force delete branch
Delete local branch regardless of merge state.
OpenIn sheetbashsame section
List all branches
Show local and remote-tracking branches.
OpenIn sheetbashsame section
List branches with last commit
Include tracking and latest commit info.
OpenIn sheetbashsame section
Create branch
Create a branch at current HEAD.
OpenIn sheetbashsame section
Create and switch branch
Create and switch in one step.
OpenIn sheetbashsame section
Switch branches
Switch to an existing branch.
OpenIn sheetbashsame section