Working with 2 config files for dev and master

Hello!,
I’m new to GitLab after so many years using TFS :slight_smile:

I got a system (Framework + BackEnd + FrontEnd) that has different config files (custom xml file and not web ar app config) for the dev env and for the prod env.
The config file structure is similer but their are url addresses and connection strings that are unique for the dev and for the prod.
The way i see it, the prod version will be set as the master as the dev will be branch of the master, and then i could change the config of the dev and NEVER merge it to the master (If the structure will be changes then i will do the changes directly on the master).
Is this is the best way/best practice to do it ?
Is there any other way you can think of ? (Maybe open 2 projects at the git… but then the merging will be painfull…)

Thanks for your help!