That is because Windows think that .gitignore is a file extension and hide the extension. And when there is nothing before the . its empty.
.gitignore
.
Here is an image with shows how to change it in the settings.