Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat's the easiest way to deal with project configuration files?
    text
    copied!<p>It's very common to have at least one configuration file in any project. Every time I share project with <code>git</code>, I have the same problem with:</p> <ul> <li>sensitive information (each developer have different DB passwords etc)</li> <li>task specific information (when developer works on certain task where one needs to change some settings)</li> </ul> <p>Obviously, configs have to be ignored somehow to prevent developer specific data to flood main repository. Now there are several ways I used to use, each with some flaws:</p> <ul> <li><code>.gitignore</code> the config files <ul> <li>the most basic way</li> <li>when developer clones repo, config file is missing and one has to find out where configs were recreate them</li> </ul></li> <li>config file isn't ignored. It contains some dummy info and each developer either untracks and puts it to his <code>.git/info/exclude</code> or set <code>git update-index --assume-unchanged ...</code> to the file <ul> <li>files are available for anyone who clones repo</li> <li>it contains advanced techniques which could confuse people that work with git for the first time</li> <li>when someone commits config files by accident, it won't allow people to pull/fetch (as excludes don't work the same way as <code>.gitignore</code>)</li> </ul></li> <li>distribute config files suffixed with, for example, <code>_original</code> while having the real files in <code>.gitignore</code>. Each developer then renames files to real names <ul> <li>files are available for anyone who clones repo</li> <li>one has to search for all configs throughout application and rename them</li> </ul></li> </ul> <p>Are there any other, possibly, better ways to handle this? I suspect I'm missing something, some plugin at least.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload