But’s the real pain of it all isn’t it? Unless you live near an Internet fiber-optic hub and have your own T3 connection (or whatever the modern equivalent is), you’ll have to put your files on some ISP’s servers. True, now you are trusting two outsiders with your code instead of one (GitHub + [Azure, AWS, Google Cloud, etc.]), but for at least most of us you’re going to have to ship your code to at least one other outsider.
Note, I share your view. I wish there was someone who offered something like a blind VM that accepted a completely encrypted Docker image for execution. But as far as I know there is no such thing.
Note-2: I did message GitHub and ask them if they intend to support an encrypted image server and they said “no”. Seems like an opportunity for some company to step in and offer this service where you do your work with decrypted source on your side, and GitHub (not the Git utility) only sees and stores encrypted payloads. As far as losing their source search on their web site, I never found that search to be very useful anyways.