I want to understand the difference between --others and --other in git-ls-files . I got same result when i use 'git-ls-files --others --ignored --exclude-standard' and 'git-ls-files --other -ignored --exclude-standard'.
Asked
Active
Viewed 231 times
1
-
Note that writing `git something` as `git-something` is the old (2005) way of invoking the command, and has been deprecated for many years. It will probably stop working in a few more years. Use `git ls-files` rather than `git-ls-files` to avoid having your software break then. – torek Oct 13 '20 at 17:26
1 Answers
1
--other
and --others
have the same meaning even though --other
is not specified in man git-ls-files
. This is how Git parses options
as explained;
Long options may be abbreviated, as long as the abbreviation is unambiguous.

Arkadiusz Drabczyk
- 11,227
- 2
- 25
- 38
-
Between 'git-ls-files --others --ignored --exclude-standard' and 'git-ls-files --other -ignored --exclude-standard', which one is correct? – lucku Oct 13 '20 at 12:22
-
Neither - it should be `git ls-files`. And you probably mean `--ignored` because a single minus means multiple short options. – Arkadiusz Drabczyk Oct 13 '20 at 12:27