Search code examples
eclipsegitegit

Are gitignore files being automatically created in my project?


I have been trying to manage the local copy of the project I am working on using EGit.

I make a pull once there is a push from the other guys. However, there are files that show that I have uncommitted changes in my local repository, but I haven't made any change. I try to resolve these by manually identifying these changes and discover that they are from gitignore files, which I didn't create myself (the files also show errors occasionally).

Is it possible that the gitignore files are being auto-created? How can I maintain a synced local repo state? I am using Eclipse Kepler.


Solution

  • It is possible that the settings "Automatically ignore derived resources" triggers the generation/modification of .gitignore.
    This is a consequence of bug 297674, adding that feature in EGit 2.3 (Q2 2013).

    See the EGit tutorial:

    You can also configure Eclipse to automatically ignore derived resources, e.g. class files via the Window → Preferences → Team → Git → Projects → Automatically ignore derived resources .. setting.