You should establish a proper pattern for storing credentials instead. Many people use environment variables, but you can also use an external configuration file. Another simple pattern used a lot in django: try: from local_settings import * except Exception: pass Then put any variable you want to override in local_settings.py and put local_settings.py in .gitignore
Ok, here, have a better example: I contract for a company which has set rules for their stuff. Trying to change these rules would be an amount of effort similar to becoming CEO, starting out as a deckswabber. One of their project is a web app. It has an .htaccess file. In production it is configured to run like this: Addhandler fcgid-script .fcgi However in development i want it to run like this: Addhandler cgi-scrip…
.htaccess is ignored while the .htaccess.dist template is part of the reop