I want to delete a branch both locally and remotely.
$ git branch -d
Delete locally:
To delete a local branch, you can use:
git branch -d
To delete a branch forcibly, use -D
instead of -d
.
git branch -D
Delete remotely:
There are two options:
git push origin :branchname
git push origin --delete branchname
I would suggest you use the second way as it is more intuitive.