Git reroot
So, you have a pet project in a private repository. It turns out that the project could work as an open source project. When you looked into its history, you find some stuff that must not go public. You want to delete those early commits and keep recent commits. Note that this article uses master as the default branch name. Recent repositories might use main for it. Note that the instructions provided in this document might destroy your working repository....