The author of the code always has the rights to do anything they want with it (except take other people's code and put it in there). The license grants rights under certain conditions to other people.
So this might only be complicated if someone else contributed to the repo, but I doubt it that removing or rebasing someone's contributions can ever be judged illegal.