Thous shalt not have environment specific configuration or data within your repo.Colin Pear, The Pharaoh
We have had a long running policy, which seems to have become an industry standard as well, that any and all environment specific configuration and data should not be contained within your repo. It is not part of the software.
It only belongs to that specific environment. It should be maintained and automated with the deployment orchestration tools used to deploy your environments within their appropriate steps in your continuous deployment pipeline.
Practically all tools have their own unique and innovative ways of storing and applying the appropriate configuration. Most utilize a variable concept, such as: Azure DevOps Pipeline Variables, Octopus Deploy Variables and Travis CI Environment Variables.
At a minimum, keeping these details out of your repo helps reduce the risk of accidental and unnecessary exposure of potentially sensitive data, such as database connection strings, api tokens, etc.