Working with branches in Git is a breeze, especially if you’re working with the GitKraken Git client to visualize your repository.

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.

It’s important to note Git does not allow you to delete a local branch if you have the branch checked out with unmerged changes.

If you aren’t using the GitKraken Git GUI, you might have to run git branch again on its own.

If you want to delete a branch using GitKraken, simply right-click on a branch name in the left panel or from the central graph and select Delete [branch name].

Related Articles