Any time I see a .gitignore file in a Git repository, I can't help but notice that, aside from the file extension, the filename is completely empty. Because of this, I've often seen new programmers run into the "You must enter a filename" error on Windows when learning Git for the first time.
Other standard files such as README.md include basenames, so it seems odd to exclude the name for .gitignore.
Is there a reason .gitignore's basename is always empty? Would the file still work properly if it were given a filename like project-name.gitignore?
.in front are a convention for "hidden" files on unix..gitignorecan be viewed like a hidden file with no extension. Windows doesn't approve of it much though..gitignoreas a file name with no extension. If it had an extension, it would be, e.g.,.gitignore.txt. But what is the extension of a file nameda.b.c.d.e? Is itd.e, orb.c.d.e? It's clearly not.e: that would be silly! :-)