79825706

Date: 2025-11-20 16:05:02
Score: 2
Natty:
Report link

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.

Reasons:
  • RegEx Blacklisted phrase (1.5): I'm new
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Darrell