Having several stale branches in a local git repository makes things cluttered. It's good practice to clear out branches as soon as they're merged.
-d flag to
git branch to delete a branch.
# Delete local branch git branch -d my-stale-branch
If the branch has not yet been merged into
master, you may get this error:
error: The branch 'my-stale-branch' is not fully merged. To resolve this, replace
-D to force deletion regardless of merge status.