Skip to content

Instantly share code, notes, and snippets.

View LL782's full-sized avatar
🎨

Laurence "DC5B" Lord LL782

🎨
View GitHub Profile
@rpowis
rpowis / pre-commit-db-export
Last active December 15, 2015 03:59
Export DB to temp file on git commit. If the export fails delete the temp file, otherwise overwrite the tracked file.
#!/bin/sh
#
# A hook script to export your database on every commit.
#
# The export is saved to a temp file. If the export
# fails, the file is trashed. Otherwise it overwrites the tracked file.
#
# Called by "git commit" with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.