- --directory
- If a whole directory is classified as "other", show just its name (with a trailing slash) and not its whole contents.
$ git ls-files -o
.bundle/config
log/development.log
vendor/bundle/ruby/2.2.0/bin/byebug
vendor/bundle/ruby/2.2.0/bin/erubis
...
$ git ls-files -o --directory
.bundle/
log/development.log
tmp/
vendor/bundle/