etckeeper - https://github.com/joeyh/etckeeper - is a great utility for automatically storing your server configuration in git, because configuration should be tracked like any other program. Ubuntu includes a package for it, but by default it uses Bazzar (Canonical's versioning system) instead of git as the author intended. To quote the README:
It's possible that your distribution has chosen to modify etckeeper so its default VCS is not git -- if they have please complain to them, as they're making things unnecessarily difficult for you, and causing unnecessary divergence of etckeeper installations.
Takes a bit of tweaking out-of-the-box. Let me save you some time.
# Login as root. sudo su # Install etckeeper. apt-get -y install etckeeper # Edit the etckeeper configuration. nano /etc/etckeeper/etckeeper.conf
Uncomment the GIT line and comment out bzr.
Exit & save.
# Go to the configuration directory. cd /etc # Initialize etckeeper. etckeeper init # Add the remote repository. git remote add origin git@HOSTNAME:REPONAME # First commit. etckeeper commit "Initial commit." # Set the upstream and push. git push -u origin master # We're done here. exit
Etckeeper will now automatically push commits to your git repository.