> How did you come up with this "./" syntax?

It is a Unix thing: "./" or just "." refers to the current directory.

When calling scripts or programs in the current directory from a Unix
command line, it is required to refer to them as, say, "./foo" (not just
"foo") -- unless "." is in your PATH.

Most people do put "." in their PATH for convenience but it is considered a
little unsafe [1].

Personally, I am surprised that gitignore does not understand this
notation. To me, OPs meaning was crystal clear: "./foo" should mean to only
ignore the foo in the repository's root directory.

[1] https://superuser.com/questions/156582/why-is-not-in-the-path-by-default

~ Tim

Reply via email to