How to delete a Git branch both locally and remotely

There will be a time when you need to delete a branch from your local and remote. Here is how I do it.

techcater@gbcweb02:$ git branch -d JulietV1.0
Deleted branch JulietV1.0 (was b6d2429).
 
techcater@gbcweb02:$ git push origin --delete JulietV1.0
Password for 'https://techcater@github.com':
To https://techcater@github.com/dalenguyen/juliet-research.git
 - [deleted]         JulietV1.0

You're welcome ;)