Answer the question
In order to leave comments, you need to log in
How to download a file from Github only once and then ignore changes to it?
I want to create a config file with passwords.
Each programmer makes a copy of the project, adjusts this file and then works as usual.
The same file must be .ignore , but at the same time must exist and not respond to changes.
Can this be done?
Answer the question
In order to leave comments, you need to log in
Usually, an example configuration file or some default configuration is added to the project.
For example in git database.yml.example
, but in .gitignoredatabase.yml
This is exactly what .gitignore is for. Each programmer clones the project, then manually creates the necessary file (copies from somewhere). Having the filename in .gitignore ensures that it doesn't get into the index.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question