[Answered ]-How do you manage production websites and settings with GIT?

2👍

Commit an example settings.py file to the repository (eg: settings.py.example) then copy and edit with the real hostname for each deployment – trying to detect things like hostname, pathnames, etc can get messy fast imho.

New deployments won’t clobber it since it’s not in the repository, but you’ll probably tell git to ignore the “settings.py” itself so you don’t commit a development setting file by accident.

0👍

I have tinkered with Silk Deployment which is a Python toolkit based around Fabric that uses Git to synchronize configurations on deployments. It is intended for use with Django and it is very, very cool. Well worth a look!

Leave a comment