configuration – Deploying appconfigs to different environments

I have a project on Azure DevOps that uses an appconfig.

The appconfig holds sensetive data like usernames and passwords and is committed empty to the repo.

I have to deploy the project on two different environments that need two different appconfigs to run.

What would be the best practice in this case?

I’m conflicted between saving the appconfigs for the different environments and selecting the appropriate one to deploy vs them holding sensitive data and not wanting to save it anywhere.