· 1 min read

Git: How to Delete a Branch with an Invalid Name

If you've named a branch beginning with two dashes "--", you're sort of in trouble because git interprets your branch name as a switch/flag. You can skip switches all together by supplying two dashes before your branch name

git branch -d -- --index_for_suppliers

and your branch will be deleted!

Comments

Leave a comment