How Do You Delete a Local Branch in Git?

At its core, the branching model offered by Git is intended to help you avoid merging unstable code into the main codebase. Working with branches in Git is a breeze, especially if you’re working with the GitKraken Git client to visualize your repository.

How to Delete a Git Branch Locally Using the Command Line

To delete a local branch in Git using the terminal, you’re going to run the git branch command and pass in the -d flag. Next, you will pass in the name of the branch you wish to delete.