Delete a remote git branch using CLI

For our day to day work it is good we can delete the branch form local and remote repositories by using cli.

For this purpose git has very simple commands to use and those are:

git branch -D branch_name
git push origin :branch_name
e.g
say my branch name is git_delete_branch then my steps are.
1) git branch -D git_delete_branch
2) git push origin :git_delete_branch

For a working illustration of above commands please refer :

Leave a Reply

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

*
*
You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>