场景:
在用idea导入java工程时,会在java工程目录生成.dea文件,每次git status时,git都会提醒
Untracked files:
(use "git add <file>..." to include in what will be committed)
.idea/
aa.class
nothing added to commit but untracked files present (use "git add" to track)
以下是解决方案:
- 使用touch命令创建
touch .gitignore
github为我们提供了一些配置信息可以供参考
https://github.com/github/gitignore
- 对.gitignore填充一些忽视的文件格式
- 添加提交.gitignore 文件
- 用status命令测试是否有效
完美解决