Auto generated files: to git or not to git?

It is quite simple to reproduce I found out, just create a new strapi v4 project, run npm run build and you will see the .strapi folder with files.

I did a little digging (emphasise on little). The files are used by the admin ui. Everytime you run npm run develop the files will be re-generated. I did not test what happens on a production environment.

Nevertheless I think I made a mistake. The .strapi folder IS in the .gitignore file. The initial project where I saw this, is in a migration path. The ignore file is not up to date as it seems. I am not sure if it is in the migration docs.

And about the typescript files, it seems (to me) that these files are required if you use strapi in typescript context, but what if you’re not?

*edit: I noticed that the types/generated folder is generated (its in the name) just like the .strapi folder: once you run npm run develop. It overwrites any changes made on later runs of npm run develop.