I can't add "taget" directory to ".gitignore" file. I do something bad :-(
martin@martin:~/git/gitRepo$ tree -L 3 -a
.
├── .git
...
├── .gitignore
└── MyProject
├── .classpath
├── pom.xml
├── .project
├── .settings
...
├── .springBeans
├── src
│ ├── main
│ └── test
└── target
├── classes
├── m2e-wtp
└── test-classes
269 directories, 32 files
martin@martin:~/git/gitRepo$
martin@martin:~/git/gitRepo$ cat .gitignore
*.*~
*.class
*.jar
*.war
*.ear
MyProject/.classpath
MyProject/.project
MyProject/.settings/
MyProject/target/
/MyProject/target/
target
martin@martin:~/git/gitRepo$
martin@martin:~/git/gitRepo$ git status
# On branch master
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: .gitignore
# modified: MyProject/.settings/org.eclipse.wst.validation.prefs
# modified: MyProject/target/classes/log4j.xml
# modified: MyProject/target/m2e-wtp/web-resources/META-INF/MANIFEST.MF
# modified: MyProject/target/m2e-wtp/web-resources/META-INF/maven/example.net/gitRepo/pom.properties
# modified: MyProject/target/m2e-wtp/web-resources/META-INF/maven/example.net/gitRepo/pom.xml
#
no changes added to commit (use "git add" and/or "git commit -a")
martin@martin:~/git/gitRepo$
"MyProject/.classpath" is in ignore list, but I still see in "git status" MyProject/target* and MyProject/.settings. Can you please help me what I do bad? Thank you!