Binary package “etckeeper” in ubuntu precise
store /etc in git, mercurial, bzr or darcs
The etckeeper program is a tool to let /etc be stored in a git, mercurial,
bzr or darcs repository. It hooks into APT to automatically commit changes
made to /etc during package upgrades. It tracks file metadata that version
control systems do not normally support, but that is important for /etc, such
as the permissions of /etc/shadow. It's quite modular and configurable, while
also being simple to use if you understand the basics of working with version
control.