git-crypt is great. I use it on a daily basis to encrypt code of some of my repositories.
Some of the software I write contains industry secrets I don't want GitHub to know or train AI with. I don't trust them in keeping my private repos safe, so I use git-crypt.
Honestly works way better than I expected initially. Once you configure it it's pretty seamless.