Putting /etc under Revision Control...

Using etckeeper

The etckeeper program is a tool to store /etc git, mercurial, or bzr repository. git is the default repository type. It hooks into APT to automatically commit changes made to /etc during package upgrades as well as daily via a systemd timer or cron job. Installing the package is all the setup that is needed, it does everything for you.

See Also