最佳答案:1. 在需要创建 .gitignore 文件的文件夹, 右键选择 Git Bash 进入命令行,进入项目所在目录。 2. 输入 touch .gitignore 在文件夹就生成了一个“.gitig