Delete commit which is merged into main branch

You can do this kind of magic with git fast-export (after you made a backup of your working copy):
Run git fast-export --no-data --all --full-tree > all_commits in your working copy. Then you open the file all_commits in a text editor, and search for "initial commit". The environment around it should look like this: