On 2022 Jun 28, at 09:48, John Thorvald Wodder II <jwodder@xxxxxxxxx> wrote: > Through further experimentation, I've discovered a fourth oddity with gitignore: If "foo//" (with two or more trailing slashes) is added to .gitignore and `mkdir -p foo/bar` is run, then `git status --ignored=matching --porcelain` won't show "foo/" or "foo/bar/" at all, which is something I'd previously only encountered for completely empty top-level directories. This holds true no matter how deep or wide you make the directory tree at "foo/", as long as it's all-directories; once a file gets added somewhere under "foo/", the "git status" command shows "foo/" as ignored. Correction: When a file is added under "foo/", then "git status" shows it as *untracked*, not ignored. I also see now that a pure-directory tree being absent from "git status" happens even without a .gitignore, so presumably this is intended behavior. It's just a little odd that, if "foo/" is an empty top-level directory, it only shows up in "git status --ignored=matching" if it's ignored. -- John Wodder