etckeeper

etckeeper is a program that will keep the content of the  directory in a git repository. It allows to check history of config files in case you need it later.

Install
This will install and configure etckeeper.

For more information, check the official README.