In one of my recent projects I started out by .gitignoring the files containing secrets and environment variables. So the entire project is committed to the repo ex
.gitignoring
Rails.application.secrets.key_name