Nuñito de la Calzada Nuñito de la Calzada - 20 days ago 5
Git Question

Git .ignore not ignoring

This is my .ignore file

.classpath
/.project/
/.settings/
/target/
.project
.settings
.target


Then I execute
git add .
and then after
git status
the files are not ignored

On branch master
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)

new file: .classpath
new file: .ignore
new file: .project
new file: .settings/org.eclipse.core.resources.prefs
new file: .settings/org.eclipse.jdt.core.prefs
new file: .settings/org.eclipse.m2e.core.prefs

Answer

The file needs to be called .gitignore