There is this popular take on Galileo's case that the church originally supported Copernicus' hypothesis and Galileo as well. But the fact that Galileo was actually actively vilifying the church and the Pope with this theory lead to him getting excommunicated. Now I have never seen this take outside of reddit, and a quick search says that heliocentrism was formally considered a heresy. To what degree is this take true?
More can always be said, especially since the Galileo affair does not seem to have had much attention in this sub (it doesn't even have its own FAQ section). I wonder if it's because it's too large an affair for a bunch of AH posts.
But! In the meantime, we do have some posts. u/ManicMarine speaks of the circumstances of Galileo's two trials here, while here, u/restricteddata goes into why the Church reacted like it did.
Also, I must note that Galileo was not excommunicated. Tried for vehement suspicion of heresy and subjected to house arrest, but not excommunicated.