Skip to content

Instantly share code, notes, and snippets.

@mallamanis
mallamanis / mysqldump_pre_commit_hook.bash
Created August 23, 2011 10:50 — forked from nuclearsandwich/mysqldump_pre_commit_hook.bash
A pre-commit hook for git which dumps and adds a mysql database to the repository just before commit.
#!/bin/bash
# Pre-commit hook to make a mysql dump right before committing and add it to the commit.
#
## Change the following values to suit your local setup.
# The name of a database user with read access to the database.
DBUSER=root
# The password associated with the above user. Leave commented if none.
DBPASS=seekrit
# The database associated with this repository.
DBNAME=dplay