By using Git-Hooks you can easily add dumps to a commit.
First we need to add our pre-commit hook:
Within the created file we simply add the following shell-code:
#!/bin/bash mysqldump -u user -ppassword --skip-extended-insert database > /repo/database.sql cd /repo git add database.sql
At least we need to make the script executeable:
chmod +x /repo/.git/hooks/pre-commit