Save the configuration file to the hero, but delete from the public repo on github?

I am trying to use newrelic in a test application that deploys in heroku.

I have both the original name (public github repo) and heroku.

After clicking on the hero with the newrelic.yml file enabled, I would like to be able to make changes to the initial state, but not include the newrelic.yml file, since it contains a license button.

I tried putting the config / newrelic.yml file in .gitignore, but it still keeps track of the file and pushes the file to the beginning. Then I tried to delete the file, but could not get the pure git status.

I tried rm config / newrelic.yml, but then even with it in .gitignore the next time I click on a hero, it deletes the file on the hero, forcing stopping new recruiting.

I saw other similar problems on SO with answers related to heroku config vars https://devcenter.heroku.com/articles/config-vars , but I don’t understand how it relates, if it is, to delete the configuration file for github.

thanks

+4
source share
1 answer

Heroku takes all your files from Github, each push replaces all your files with new ones. I do not think you can do something like this.

If you put your file in .gitignore, you cannot click it on Heroku.

The solution may be to use a branch on Github, on the main you keep your code without a configuration file, and on the "Heroku" branch you add a file and use it to click on Heroku.

+6
source

All Articles