In an attempt to create a tracking branch, I managed to create a local branch named '-t'. I cannot delete a branch because the branch name is also a parameter. This is located on a Windows computer.
$ git branch -D -t
fatal: branch name required
Escaping doesn't help either
$ git branch -D \-t
fatal: branch name required
Putting the branch name in quotation marks does not help
$ git branch -D "-t"
fatal: branch name required
Using git gui to try to remove a branch gives the same error message.
I thought to just remove the '-t' from .git / refs / heads - is that enough? Or is it still not? Or is there a way to remove it from the command line?
source
share