VersionPress is a free and open-source plugin that brings the full power of Git to WordPress. Its key strength is that it version-controls not just files but also the database.