Search code examples
eclipsegitignoreegit

How can I prevent eclipse from randomly adding .gitignore files everywhere?


eclipse keeps adding .gitignore files to my project that contain the following random list of files:

Thumbs.db
.DS_Store
.gradle
build/
out/
.idea
*.iml
*.ipr
*.iws
.project
.settings
.classpath
/bin/

I know which files I want to keep out of source control. I don't need my IDE to try to second guess me.

Where is the configuration option in eclipse that prevents it from creating .gitignore files.


Solution

  • I mentioned before (2014) the setting "Window → Preferences → Team → Git → Projects → Automatically ignore derived resources"

    See if that would still have an incidence in your case (with, I presume, a much more recent Eclipse version)

    This was also described (more recently, in 2020) in "Eclipse: Prevent creation of .gitignore for generated code" from Thomas Trocha

    https://thomas.trocha.com/blog/content/images/2020/09/grafik.png