Reputation: 11438
I accidentally created a local branch named --help
and can't figure out how to delete it. The usual -D
or --delete
doesn't work when followed by the --help
. It just outputs help text:
$ git branch -D --help
usage: git branch [options] [-r | -a] [--merged | --no-merged]
or: git branch [options]...etc
I've tried single '
and double "
quotes and get the same result.
Upvotes: 1
Views: 29
Reputation: 11438
git branch -D -- --help
The first --
is used to avoid parsing --help
as a command line option.
Source: https://unix.stackexchange.com/a/1520/140838
Upvotes: 3