How to delete a git branch Locally and Remotely

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…

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store