When using maven and git remember to add this to the .gitignore!
.classpath
.project
.settings/
target/
bin/
If you have a project that already has these file/folders commited it can be easily corrected/removed from the main repository without effecting you local eclipse settings
git rm -r --cached .settings/
git rm -r --cached bin/
git rm -r --cached target/
git rm --cached .project
git rm --cached .classpath
Where: –cached Use this option to unstage and remove paths only from the index. Working tree files, whether modified or not, will be left alone. -r Allow recursive removal when a leading directory name is given.
Last thing eclipse will most likely ignore the remove commits this can be resolved by just commiting the removals from command line:
git commit -m "Fixed Maven, Eclipse and Git files"