You shouldn't commit unencrypted secrets to git anyway, public or private, on-site or in cloud.
There are plenty of tools to either keep them encrypted (we just use simple GPG, but our team is small) or just auto-generate and never show to user in the first place (various key vaults that can be used from automation like HashiCorp's Vault)