Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Did you try</p> <pre><code>git branch -D -- --track </code></pre> <p>? the "<code>--</code>" is usually the convention for "what follows is not an option, whatever its name"</p> <hr> <p>From "<a href="http://www.faqs.org/docs/artu/index.html" rel="noreferrer">The Art of Unix Programming</a>", section "<a href="http://www.faqs.org/docs/artu/ch10s05.html" rel="noreferrer">Command-Line Options</a>":</p> <blockquote> <p>It is also conventional to recognize a double hyphen as a signal to stop option interpretation and treat all following arguments literally.</p> </blockquote> <p>You will find that convention in other (not necessary Unix-related) CLI (Command Line Interface) like <a href="http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m0/index.jsp?topic=/com.ibm.rational.clearcase.cc_ref.doc/topics/cleartool.htm" rel="noreferrer">cleartool</a>:</p> <blockquote> <p>If a <strong>nonoption argument</strong> begins with a hyphen (<code>–</code>) character, you may need to precede it with a double-hyphen argument, to prevent it from being interpreted as an option:</p> </blockquote> <pre><code>cleartool rmtype -lbtype -- -temporary_label- </code></pre> <p>The <a href="http://wizard-labs.org/p18/commands.html" rel="noreferrer">P18</a> (a fast and flexible file preprocessor with macro processing capabilities and special support for internationalization) mentions that also and gives a good description of the general idea behind that convention:</p> <blockquote> <p>All option arguments passed to the commands start with a single hyphen.<br> All option arguments (if any) must precede all non-option arguments.<br> The end of the option arguments may be signaled using a <strong>double hyphen</strong>, this is useful if a non-option argument starts with a hyphen. Terminating the list of option arguments with a double hyphen works for all commands, even those that don't take any option arguments.</p> </blockquote> <p>The <a href="http://optionparser.rubyforge.org/" rel="noreferrer"><strong>OptionParser</strong></a> tool written in ruby also lays it out quite plainly:*</p> <p>Option Parsing Termination</p> <blockquote> <p>It is convention that a double hyphen is a signal to stop option interpretation and to read the remaining statements on the command line literally. So, a command such as: </p> </blockquote> <pre><code> app -- -x -y -z </code></pre> <blockquote> <p>will not ‘see’ the three mode-flags. Instead, they will be treated as arguments to the application: </p> </blockquote> <pre><code> #args = ["-x", "-y", "-z"] </code></pre> <hr> <p>Note: sometimes, it takes three dashes and not two, especially when the CLI follows strictly the Gnu options styles:</p> <blockquote> <p>The Gnu style command line options provide support for option words (or keywords), yet still maintain compatibility with the Unix style options.<br> The options in this style are sometimes referred to as <strong><code>long_options</code></strong> and the Unix style options as <strong><code>short_options</code></strong>.<br> The compatibility is maintained by preceding the long_options with two dashes</p> <p>Similar to the Unix style double-hyphen ’<code>--</code>’, the Gnu style has a triple-hyphen ’<code>---</code>’ to signal that option parsing be halted and to treat the remaining text as arguments (that is, read literally from the command line) </p> </blockquote> <p>So... if ' <code>--</code> ' is not enough (it should be with Git commands), try ' <code>---</code> '</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload