How to delete a git branch Locally and Remotely

Chamika Kasun
2 min readJun 25, 2021
Git

I have seen lots of people struggling to delete a git branch from the local and the remote repository. Here is a quick guide to delete your branch in such a way.

Quick Guide

git push -d <remote_name> <branch_name>
git branch -d <branch_name>

NOTE:
In most cases the remote name is origin. In such a case you'll have to use…

--

--

Versatile Full-stack Engineering Lead with 7+ years of experience designing, developing, and managing complex applications and internal frameworks.