I currently keep my code in a local Git repository and periodically copy it to an external hard drive. I only upload compiled binaries to my store pages and prefer not to publish the source code. Since I stopped using GitHub because I'm uncomfortable with code being used for AI training, I'm looking for a more reliable private backup or hosting setup than relying on just my computer and a hard drive. What storage or version-control service do you use?
4 Answers
A private repository on a service such as GitLab or Bitbucket is a convenient alternative to GitHub. If you want maximum control over where the code goes, run a lightweight Git server yourself and use an encrypted off-site backup in addition to local storage.
Git is separate from GitHub, so you can keep using Git while choosing another host. GitLab, Bitbucket, and self-hosted options such as Gitea or Forgejo can keep repositories private. A self-hosted service on a small home server or Raspberry Pi gives you more control, although you should still back it up elsewhere.
For a simple setup, keep the repository locally and maintain at least one additional copy on an external drive or USB device. Periodically creating an archive of the repository can work, but make sure the backup is stored separately from your main computer and tested occasionally.
Mercurial is another distributed version-control system if you dislike Git’s workflow. You can run it entirely locally or host the repositories on your own machine, but the important part is having automated, redundant backups rather than which version-control tool you choose.

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