I wonder whether something like [0] would work, where the repository is encrypted on push and decrypted on pull. Might be against Github's terms of use, though.
Why would that be against github TOS? Encrypted files in git are not exactly unusual.
My thinking was that it's effectively a private repository (albeit publicly visible), so it would subvert their business model.
they were talking about it being a private repo anyway that they were worried about.
Well, it'd be pretty shitty. Diffs would be binary and practically useless; merges would have to be entirely manual. Github would lose more in brand trust than they would gain in saved costs on those repos (or lost revenue).