I'd hate the idea of having a record of all my mistakes as a student. I'd probably just use a separate remote for my develop branch and squash into one commit when merging to master.
In a classroom setting, you don't have to pretend to be perfect. You have to learn. Perfection, polished history, etc is something you can save for your future career.
Overall, I think this is a well received release, since it's something I know many students have appreciated in the past rather than waiting a week for teachers to grade their code.
There's nothing this too can do to prevent me from doing this.
If the teacher then judges the submission by also looking at the history, I will have an unfair advantage by just having read and internalized got features.