I have a private repository. I was using MIT license. But now I want to change it to GPL3 before making it public. The problem is that if I change the license in a commit and push it, technically, you are allowed to use a previous commit according to MIT license (which I don't want).
Is there a way to change the license in all of the previous commits? I heard about doing it individually for each commit in git rebase but there needs to be a better way!