创建git忽略文件 1、在需要创建 .gitignore 文件的文件夹, 右键选择Git Bash 进入命令行,进入项目所在目录。 2、输入 touch .gitignore ,生成“.gitignore”文件。