[For completeness sake: I am in a setting where I am accessing, from a single local copy, a private repo, of which I have sole access. There is no concern related to other users or even cloned versions of the repo in this particular setting.]
I have been trying to figure out how to completely delete a range of commits from a directory.
The important thing is that I am not functionally trying to undo the commit (i.e., I want to revert the repo to the state without the commit, using perhaps a reversing commit), I am trying to concretely remove the commit (i.e., I don't want it appearing in the commit history anymore). I have found a lot of answers that either explain how to do this locally, or how to functionally revert remotely — but not how to remove the commit from history completely.
This is because for the purposes of debugging continuous integrations, I made 40 commits, that I would like to squash.
How can do this? Again, the commits have all been pushed to a repo, and I want to remove these commits from the history. (It would be nice if I can merge all the changes into a single commit, but my main focus is removing the commit history so I can reintroduce the changes by hand if necessary.)
Here is an example repository, say I want to remove or squash the top 10 commits: https://github.com/jlumbroso/push-generated-file/commits/main
Thank you!