Swap non-git configuration file on branch change
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?
Please sign in to leave a comment.
Hi,
Committing the .gitignore file should work.
Please see: https://stackoverflow.com/questions/21600439/should-i-commit-gitignore-file