A .git directory keeps reappearing in my project, inside a directory that I think should be ignored. It reappears each time I clean the project or refresh it in Eclipse. The duplicated .git directory results in redundant files that prevent the project from building.
I have an Android project in Eclipse that links source from a Java project, which is the way LibGDX handles a project. The .git directory that I don't want contains a file that causes a conflict, so I have to delete it every time I want to build to device.
It is creating the directory MyProject/bin/classes/.git. But I have bin/ in my .gitignore file. My repository is in MyProject.
The conflicting file is \bin\classes.git\COMMIT_EDITMSG. This conflicts with a file in my linked source Java project: \gen.git\COMMIT_EDITMSG. Also the same issue, because I have \gen in the .gitignore of that project.
I am pretty sure either Eclipse or ADT that is copying the .git
directory over to the bin
directory when it rebuilds or cleans the project.
So my question now is, how do I get Eclipse and/or ADT to stop doing that?
(If you want to see my old .gitignore, which I think is irrelevant because it was set up correctly to ignore the bin directory, you can click the "Edited" link to see it in this post's history.)