Today I'm going to push the local project to GitHub with Git, but there's some information I don't want to add to the version control system, For example. classpath files and. class files and so on, this time I thought of using the. gitignore file to exclude files that do not need to be versioned, I intend to create a new. gitignore file under my project root, and when I write the file name and press ENTER, I get this error:
Without knowing which version of Windows to start with, the system cannot create. xxx files, and I remember XP systems can also create such files. Google has a variety of solutions, and finally found a better solution above the StackOverflow:
1. Create a Gitignore.txt file under the project root directory
2. Save the file name you need to exclude to gitignore.txt
3. Hold down the SHIFT key and the message under the project root and select "Open Command Window Here"
4. Execution of commandsren gitignore.txt .gitignore
It's done!
Resolution of the "file name must be typed" error appears in Windows system new Gitignore file