Preview merged branches before cleaning them up
List local branches that have already merged into your current branch before removing any refs.
First review the branches that are already merged into your current branch. This command only lists them:
git branch --merged
After reviewing the output, you can remove one named local branch with git branch -d branch-name. The lowercase -d refuses to delete a branch Git does not consider merged. Avoid bulk deletion until you have checked the list and confirmed the branch is no longer needed.
Review commands and snippets before using them in your environment. Examples are not executed by LeafDeft.