Swap non-git configuration file on branch change

Answered

Hi,

The problem is:

Project has local configuration files depenent on environment. While I work on one branch (development) these config files relate to development database, etc.

But development branch is a branch of production environment, what has other configuration (another database, etc.).

This is both on remote servers and my local servers. Because of this, configuration files are “local” - are added to git-ignore.

Nevertheless - they depend on branch. One set is for “master” branch, and another one is for “development” branch. I cannot add them to git because configuration is different for both remote server and for my local server.

Is there a way to “swap” these git-ignored configuration files while branch is changed?

1

Please sign in to leave a comment.