I accidentally created a git local branch called --track, how can I delete it?
I mistyped a git command which resulted in the creation of a local branch called, '--track'.
I've tried the following:
git branch -m --track delme
(this renames the current branch to delme, not the branch called --track)
git ch开发者_运维知识库eckout --track
> fatal: --track needs a branch name
git branch -d --track
(does nothing, reports nothing)
git branch -D --track
(also does nothing)
git branch -d "--track"
(also does nothing
How can I delete this branch?
git branch -d -- --track
In general, --
tells git to treat all subsequent command-line arguments as non-options.
EDIT: See the comments for clarification regarding how git uses --
.
精彩评论