"You must type a file name" error thrown, when I create a .gitignore file on Windows

leventunver picture leventunver · Feb 6, 2016 · Viewed 29.6k times · Source

When I try to do this, I get the following error:

gitignore error

Obviously, Windows Explorer doesn't allow me to create this type of file patterns. How can I overcome this problem?

Answer

Philippe picture Philippe · Feb 6, 2016

I arrive a little late but will give you the trick!! 😉

In the File Explorer, call your file .gitignore. and it will remove the ending '.'

A strange behavior from the file explorer but, hey!, it works 😅

Or create it from a text editor...