2.2. Tracking configuration changes

During the course of this manual, we will edit a lot of configuration files and install many application packages and sometimes it is really hard to remember what we did and why after a couple of months have passed.

To stay on top of the game we will use etckeeper.

Etckeeper is an application that uses version control systems like git, Bazaar or Mercurial to track changes made to the /etc folder.

apt-get install etckeeper

Etckeeper in Debian uses git for tracking changes and is set to automatically commit all of the changes before a new package is installed as well as to auto commit changes on a daily bases.

Since i do now want to forget to describe changes I made to the files in /etc I usaully disable automatic commits. Edit /etc/ectkeeper/etckeeper.conf and uncomment out these two lines:

AVOID_DAILY_AUTOCOMMITS=1
AVOID_COMMIT_BEFORE_INSTALL=1

Set name and email git will use for the commit log by running this two commands at the shell:

git config --global user.name "Your Name"
git config --global user.email you@example.com

It is time for our first commit

etckeeper commit "Changed etckeeper settings to disable auto commits"

To view the change log navigate to the /etc folder and run:

git log

You can learn more about git and etckeeper at the projects homepage.

[Warning]Warning

Remember to commit your changes after the each change you make or you will not be able to install packages because etckeeper will complain that there are uncommitted changes in the folder.