Git Delete Branch | Git Tutorial For Beginners

How To Delete a Git Branch?

If you wants to delete a git branch from both your local and remote, then you need to apply following command using git bash:
Delete Local Branch

 $ git branch -d <branch_name>

Delete Remote Branch

 $ git push <remote_name> -d <branch_name>

Please note that, in most cases remote_name is origin.

Hope this will help you.

Nahidur Rahman Rifath

Passionate Software Engineer, Content Writer, Reader

1 Comment

Leave a Reply

Your email address will not be published. Required fields are marked *