I made a mistake when I checked out a new branch with git. git version 1.7.1
I ran git branch -b --track origin/develop
and I got a branch named --track
. How can I delete it?
What I have done:
$ git branch
--track
* develop
master
$ git branch -d --track
$ git branch -d "--track"
$ git branch -D --track
$ git branch -D "--track"
$ git branch -D '--track'
$ git branch
--track
* develop
master
Rather than trying to figure out (if there is) a way to get the git tools to do it, you can simply
rm .git/refs/heads/--track
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With