It is an extremely unusual use case, but I would like to remove all tracked files from git repo. Yes, the tracked files, not the untracked ones.
I have a big set of code generation files, some of them binary some of them text files. I would like to be able to track the history of the text generated files. I have the ignore list set, etc. The problem is that the next time I run the generation process it will change the needed files, add the new ones, but it is not going to remove old ones that are not generated anymore. Deleting the whole work-tree will do, but it will also remove the binary and other files that are already there, and I do not want to do that.
If I have the option to use git to clean only the files that are tracked will be the best using already prepared complex .gitignore file to distinguish the files, but I do not see anything in the documentation.
Is there tricky or not an option how to delete from the work-tree all files that are tracked.