Community
Participate
Working Groups
Egit already offers an option to automatically append on .gitignore derived resources. It's in Eclipse->Window->Preferences; "Version control (Team)"->Git->Projects; where you can find the option "Automatically ignore derived resources by adding them to .gitignore". While this is useful in some projects, I think it would be useful to a more fine grained option, where I would like to "Automatically add "linguist-generated=true" attribute to derived resources by adding them to .gitattribute". Basically I want to leverage what is written on https://docs.github.com/en/repositories/working-with-files/managing-files/customizing-how-changed-files-appear-on-github because there are some file in my project that *are* autogenerated, but that I need to keep in the project itself.
A static .gitattributes file that you maintain manually isn't good enough? I would expect such generated files to be in particular folders or have particular extensions, so that some static rule like, for instance, src-gen/** linguist-generated should be able to catch them.
Sure, I can write the .gitattribute myself (in my case it's a little bit more complex, because I have about 4 "roots" of generated sources, and also some exceptions, but nothing that cannot be handled manually). But - in the various project I work on I also use a plugin (autoderiv - https://nodj.github.io/AutoDeriv) to automatically mark resources as derived. In my workflow I have just one file as "source of truth" for derived resources, .derived, in the the root of the project. AutoDeriv automatically mark the files/folders as derived in eclipse (so, for example, the search automatically ignores those resources), and EGit automatically updates the .gitignore file. This is good for almost all of my projects (BTW thanks for the .gitignore feature!). Now in this project I need to keep track of these derived resources, and I would hope to have a "variation" of the .gitignore scenario