Deleting a badly named git branch

后端 未结 6 917
一生所求
一生所求 2020-11-22 11:53

I know this isn\'t strictly a programming question, but it is related to git. I accidentally have created a branch in git called --track (I got the order of opt

6条回答
  •  醉酒成梦
    2020-11-22 12:13

    I'm using msysgit 1.7.0.2 and the suggested solution doesn't work:

    git branch -D -- --track # doesn't work

    No error is reported, but the branch still remains. I ended up forcibly removing the branch via:

    rm .git/refs/heads/--track

提交回复
热议问题