I use local Gitea hosted on a pi cluster. I only push open source stuff I want to share to github. Most of my code does not push there anymore. No reason to give them training data without compensation.
My local gitea has its database and files on a NAS storage device, which encrypts and backs up to an AWS S3 bucket in another continent.