I want to track random config files / directories from my server into git repository. I do not mean tracking the /etc, here are some examples:
/etc/named.conf /etc/named/* /var/named/* /usr/local/apache/conf/* /etc/php.ini /etc/my.ini /var/www/config.ini
and so on...
since git does not follow symlinks, I can mount with bind, e.g.
mount /etc/named /REPO/etc-named -obind mount /var/named /REPO/var-named -obind
I don't like this approach because it will do mount for each directory, but at least this is safe and will works correctly.
for files, I can do hard links, but I do not like the idea very much, because I can "lost" the link easily if I do something like:
mv /etc/named.conf /etc/named.conf.old cp xxxxx /etc/named.conf
any suggestions how this can be sorted out?