How to Delete Local and Remote Git Branches
If you have previously worked with Git for versioning your Angular code, there is a good chance that you had some situation where you wanted to delete a remote branch or multiple branches. This happens many times to developers, particularly in large projects.
In this article, we'll learn:
How to delete a local branch in your Git repository,
How to delete a remote branch in Git,
How to delete all Git branches which have been merged,
How to remove all local branches, not on remote,
How to delete all your local Git branches except master.
Read the full article How to Delete Local and Remote Git Branches