I currently use Git locally and periodically copy my repositories to an external hard drive. I only upload compiled binaries to my store pages, since I don't want to publish the source code. I stopped using GitHub because I'm uncomfortable with code being used to train AI systems, so I'm looking for a more reliable or private way to back up and manage my repositories without depending solely on my computer and a hard drive. Ideally, I'd like something that supports private repositories or self-hosting.
2 Answers
Git is only the version-control tool; GitHub is just one hosting provider. You can use a private repository on another service, such as GitLab or Bitbucket, or host a Git server yourself. That gives you off-site redundancy while keeping the repository private. I’d still maintain a separate local backup rather than treating the hosting service as your only copy.
If you don’t enjoy Git, Mercurial is another distributed version-control option. You can run it entirely on your own hardware, such as a small home server or single-board computer, and keep external backups. It’s less commonly used today, though, so Git will generally have better hosting and tooling support.

Related Questions
How To: Running Codex CLI on Windows with Azure OpenAI
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically