开发者

How to remove a branch named "--orphan"

So I was trying to create an orphan branch. I tried 开发者_高级运维a couple of things and one of them (git checkout -b --orphan newbranch) managed to create a branch called "--orphan"; now it won't let me delete it using git branch -d --orphan. I've also tried using quotes and escape characters. Nothing seems to work. I also tried using gitg to delete and to rename the branch; this didn't work.

How can I delete this branch?


git branch -d -- --orphan

Everything after -- is taken as an argument and not a switch. This works in many places in git (and in many other Unix programs).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜