When I try to do this, I get the following error:
Obviously, Windows Explorer doesn't allow me to create this type of file patterns. How can I overcome this problem?
In the File Explorer, the trick is to call your file .gitignore.
and it will remove the ending .
A strange behavior but, hey!, it works 😅
Or create it from a text editor...