If you right click in Windows and try to make a new text file with a . period/dot in front of it:
![image image](http://www.hanselman.com/blog/content/binary/Windows-Live-Writer/How-to-c.-dot-prefix-in-Windows-Explorer_14102/image_d147ddb0-09c3-4777-a2c6-34296b97f82e.png)
Name the file...something like .gitignore, for example.
![image image](http://www.hanselman.com/blog/content/binary/Windows-Live-Writer/How-to-c.-dot-prefix-in-Windows-Explorer_14102/image_4e5df34d-2dc8-4a42-acef-db2488188aba.png)
You'll get the "You must type a file name" error.
![image image](http://www.hanselman.com/blog/content/binary/Windows-Live-Writer/How-to-c.-dot-prefix-in-Windows-Explorer_14102/image_bd48d6bb-a0a8-4b51-be8d-0c8a7f542fb7.png)
But, rather than typing .gitignore, if you include an ending dot also, like
.gitignore.
Then it works fine.
![image image](http://www.hanselman.com/blog/content/binary/Windows-Live-Writer/How-to-c.-dot-prefix-in-Windows-Explorer_14102/image_7d980a38-41a8-4933-9589-e684b5cc94b1.png)
Thanks, Mads, for the tip!
NOTE: We're assuming that you have "File name extensions" turned on, because if you don't, you're likely not a programmer. ;)
![image image](http://www.hanselman.com/blog/content/binary/Windows-Live-Writer/How-to-c.-dot-prefix-in-Windows-Explorer_14102/image_d8c55d03-ab2d-4961-9d01-c6f9cd58384a.png)
![image image](http://www.hanselman.com/blog/content/binary/Windows-Live-Writer/How-to-c.-dot-prefix-in-Windows-Explorer_14102/image_d147ddb0-09c3-4777-a2c6-34296b97f82e.png)
Name the file...something like .gitignore, for example.
![image image](http://www.hanselman.com/blog/content/binary/Windows-Live-Writer/How-to-c.-dot-prefix-in-Windows-Explorer_14102/image_4e5df34d-2dc8-4a42-acef-db2488188aba.png)
You'll get the "You must type a file name" error.
![image image](http://www.hanselman.com/blog/content/binary/Windows-Live-Writer/How-to-c.-dot-prefix-in-Windows-Explorer_14102/image_bd48d6bb-a0a8-4b51-be8d-0c8a7f542fb7.png)
But, rather than typing .gitignore, if you include an ending dot also, like
.gitignore.
Then it works fine.
![image image](http://www.hanselman.com/blog/content/binary/Windows-Live-Writer/How-to-c.-dot-prefix-in-Windows-Explorer_14102/image_7d980a38-41a8-4933-9589-e684b5cc94b1.png)
Thanks, Mads, for the tip!
NOTE: We're assuming that you have "File name extensions" turned on, because if you don't, you're likely not a programmer. ;)
![image image](http://www.hanselman.com/blog/content/binary/Windows-Live-Writer/How-to-c.-dot-prefix-in-Windows-Explorer_14102/image_d8c55d03-ab2d-4961-9d01-c6f9cd58384a.png)
No comments:
Post a Comment