10 ms·
It forces git to intereperet what comes after as paths. Normally this is not needed, but occasionally you get a filename that causes ambiguity. For instance, "
by gizmo686 4y ago
It forces git to intereperet what comes after as paths. Normally this is not needed, but occasionally you get a filename that causes ambiguity.
For instance, "git checkout test.c" will check out the file test.c unless you happen to have a branch called "test.c". (See also people complaining that checkout is overloaded".
Simmilarly, "git add --verbose test.c" will add test.c, and log that to stdout. "git add -- --verbose test.c" will add test.c and --verbose, where "--verbose" is the name of a file.
This isn't git specific, most CLI tools use "--" to restrict the parsing on arguements that follow.