How to reuse/extend etckeeper's metadata engine for git control of non-/etc filesystems, or extend git natively with said capability?
Solution 1:
According to this serverfault answer, you just do this:
It is right there in the man page.
- Create a directory
/foo
- Initialize with etckeeper:
etckeeper -d /foo init
- Commit apply commits to the directory:
etckeeper -d /foo commit 'message'
Solution 2:
I digged in this problem and I decided to create a project git-store-meta for it.
git-store-meta is a perl script which integrates the nice features of git-cache-meta, metastore, setgitperms, and mtimestore. It should serve a good compromise of the flexibility, functionality, performance, and cross-platform portability and consistency.