I am trying to import a repository (https://github.com/LibreOffice/core.git) into Azure Devops but can't due to the fact it has corrupted commits (too many < or wrong spaces etc far back in its history). This also prevents it being imported into Github.
A solution I have tried is to do a shallow clone (not include the old corrupted commits) to a local repo and then push that to Azure Devops but I get the error "shallow update not allowed" as explained in this previous thread Remote rejected (shallow update not allowed) after changing Git remote URL
All the solutions result in having to unshallow the repo first. I can't do that as doing that will include the corrupted commits. Is there no way of cloning and removing the corrupted commits?