This following can used to distribute common files amoung hosts. For example, to distribute a shared hosts file.
Initial Setup:
mkdir /etc/gitfiles
cd /etc/gitfiles
git init
git remote add origin https://1.2.3.4/path/to/shared/repo.git
git fetch origin
git branch -f master origin/master
git checkout master
cd /etc
ln -sf /etc/gitfiles/hosts
Create update script (/etc/gitfiles/update-repo.sh):
#!/bin/bash
update_repo()
{
cd "$(dirname "${0}")" || exit 1
git fetch origin || exit 1
git merge origin/master || exit 1
}
update_repo
Add to Cron:
*/15 * * * * bash /etc/gitfiles/update-repo.sh