How do I delete a Git branch locally and remotely?

Delete Local Branch

Run this git command to delete local branch

git branch -d <branch>

git branch -D <branch> (forcefully delete local branch)

Delete Remote Branch

Run this git command to delete remote branch

git push origin –delete branchname

Leave a Reply

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

Follow by Email
LinkedIn
Share
Instagram