-
-
Save bartkamphuis/7834870 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| #!/bin/sh | |
| cd /path/to/your/repo/ | |
| gunzip -v < [database].sql.gz | mysql -u [mysql_user] -p[mysql_password] [database] | |
| # Note: | |
| # No need to have these comments in the file... | |
| # This file's location @ /path/to/your/repo/.git/hooks/post-merge | |
| # Be sure to make this file executable via: | |
| # sudo chmod +x /path/to/your/repo/.git/hooks/post-merge |
This file contains hidden or 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
| #!/bin/sh | |
| mysqldump -h localhost -u [mysql_user] -p[mysql_password] --skip-extended-insert [database] | gzip > /path/to/your/repo/[database].sql.gz | |
| cd /path/to/your/repo/ | |
| git add [database].sql.gz | |
| # Note: | |
| # No need to have these comments in the file... | |
| # This file's location @ /path/to/your/repo/.git/hooks/pre-commit | |
| # Be sure to make this file executable via: | |
| # sudo chmod +x /path/to/your/repo/.git/hooks/pre-commit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment