3 ms·
-- is typically to end argument processing and to treat all further ones as files. With git-restore, it's probably only relevant if you happen to have files in
by chungy 5y ago
-- is typically to end argument processing and to treat all further ones as files. With git-restore, it's probably only relevant if you happen to have files in your repo that begin with hyphens. A fairly unusual situation, granted, but not forbidden.
- greatgib 5y agoStill does not really make sense. Because you can still quote the - if ever you had such a file, and most Unix tools have the -- optional only if you would need it. Not systematic!
- chungy 5y agoHow would you quote it, exactly? You have to remember that quotation marks are processed by the shell, not the program. ls -file ls "-file" Both of these commands to ls will have an argv comprised of: ls, -file