The configuration directory / etc should be versioned for documentary reasons and for backup. All changes are visible at a glance and a previous state can be restored easily.
In / etc are also security-related information. Therefore, care should be taken when transferring and backup the repository on encrypting and restrictive file permissions.
Therefore, I use a private gitlab server.
apt-get install git etckeeper
Make sure, that
git config --global user.name "User"
git config --global user.email "firstname.lastname@example.org"
git config --global core.editor "vim"
If you use your own gitlab-Server:
git remote add origin email@example.com:your-git.git
Initialize the git-Repo:
And store everything:
git push -u origin master
/etc/cron.daily/etckeeper if you use your own git-Server:
etckeeper commit "daily autocommit" >/dev/null
cd /etc; git push origin master;