The accepted answer is great, and I wanted to add a side note, but I'm new to SO...
If you attempt to use the accepted answer in a PowerShell environment you will have an incomplete hash literal error. To fix this, wrap the @{-1} in quotes so the command becomes:
git branch -D "@{-1}"
You do not need the quotes when writing the git alias however.