etckeeper is a program that will keep the content of the
/etc directory in a git repository. It allows to check history of config files in case you need it later.
$ sudo apt install etckeeper
This will install and configure etckeeper.
For more information, check the official README.