# built application files
*.apk
*.ap_
# files for the dex VM
*.dex
# Java class files
*.class
# generated files
bin/
gen/
# Local configuration file (sdk path, etc)
local.properties
# Eclipse project files
proguard-project.txt
# Proguard folder generated by Eclipse
proguard/
# Intellij project files
*.iml
*.ipr
*.iws
.idea/
You only ignored the *.class file compiled by java, not *.java
You can take a look at Liao Xuefeng’s GIT blog’s explanation on file ignoring.
Special files ignored
vim .gitignore
查看.gitignore文件如果你要忽略.java文件,需要加上
*.java