3

I installed etckeeper on my ubuntu 11.10 server, and after creating the etckeeper repository with:

etckeeper init
etckeeper commit "Initial version"

I got the error:

bzr: ERROR: No changes to commit. Please 'bzr add' the files you want to commit, or use --unchanged to force an empty commit.

So I added a test file and then I could create the etckeeper repository:

touch /etc/test
etckeeper commit "Initial version"
rm /etc/test

But still there seems to be no git repository there:

cd /etc
git status

How can I use git to watch changes?

rubo77
  • 2,282
  • 3
  • 32
  • 63

2 Answers2

3

I found out:

in the config-file etckeeper/etckeeper.conf You have to set

VCS="git"
#VCS="bzr"

then again:

etckeeper init
etckeeper commit "Initial version"

Then everything works on git:

cd /etc
git status
rubo77
  • 2,282
  • 3
  • 32
  • 63
3

I hit the same issue on 14.04, however it was a bit more annoying as the package was initializing etckeeper using bazaar automatically on apt-get install.

Switching to git in the config file as mentioned above wasn't enough; I first had to undo the bazaar setup which was done at install time, like this:

etckeeper uninit

The steps above then worked fine.

Dave Cahill
  • 193
  • 1
  • 7