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 checkout --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 --
.
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