Practical staging of config
I would approach it this way:

Have a branch master:

Create 2 separate branches fed from the master (master being prod):
- stage
- test

Create a new branch abcfeature based from master, after complete, merge to stage/test.

Use domain alias's to setup different URLS in your test environment.