Last active
December 10, 2020 10:05
-
-
Save souhaiebtar/81cf2c0d979ac183f0c060eda94a59d2 to your computer and use it in GitHub Desktop.
[pre-commit git hook for DB] pre-commit git hook for DB #git #hooks #linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
git --work-tree=../ --git-dir=../.git | |
now=$(date -Is) | |
cd ../laradock | |
docker-compose exec -T mysql mysqldump -u root --password=root project_db > ../public/DB/PROJECT-NAME_$now.sql | |
cd ../public | |
git add DB/PROJECT-NAME_$now.sql | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment