Best practice integration with source control and multiple environment configuration

Let’s say I want to store URL and token for accessing API to configuration file. I have 3 environment, those are development, staging and production. They have different configuration value for each environment. I am using source control too. For sure, I don’t want to share production environment configuration file to source control. So is there a best practice to manage this problem ?