Delete Git branch locally (Be careful, your code or data will be lost)
# method 1 git push -d your_local_branch_name # method 2 git push -D your_local_branch_name
-dis an alias for
--delete, which delete only local branches
-Dis the alias for
--delete --force, even if this branch hasn't been merged or pushed.
Delete Git branch remotely (Be careful, your code or data will be lost)
git push origin --delete your_remote_branch_name
origin is your remote repo (an alias for your full remote repo name), and it is the most cases when you are using online git service, such as github, bitbucket and so on.