I have config settings that differ between prod and dev environment. When I take a pull in prod environment it is bringing in the dev config code too even though I have added them in git ignore file.
I need the config files to be isolated to each environment and need to exclude the config files from moving with the pipeline deployment.
Currently the commit is showing the dev config files in the pull request when deploying to prod even though the config files are part of the git ignore file.
How do I prevent the dev config files from coming along in the prod deployment?
Hello,
Is your .gitignore file the same across all your branches? If not, can you paste in an example of it?
If the configuration files are being pushed to Bitbucket, it means it has already been included in your commit history. A gitignore file will only prevent the file from being added to a commit. It won't prevent it from being merged across branches.
An alternative approach would be to let your configuration files be added, but give them different names. The use a Deployment Variable in Pipelines to indicate which configuration file should be used in each deployment.
Thanks,
Phil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.