Skip to content

Instantly share code, notes, and snippets.

@jeffbeagley
Last active June 15, 2018 04:24
Show Gist options
  • Save jeffbeagley/a587e23827b236b51d7885340e7af8b3 to your computer and use it in GitHub Desktop.
Save jeffbeagley/a587e23827b236b51d7885340e7af8b3 to your computer and use it in GitHub Desktop.
Easy way to track Git changes with MySQL and Docker
#!/usr/bin/env bash
docker exec CONTAINER_NAME mysqldump -u USERNAME -pPASSWORD DATABASE_NAME --no-data > db_schema_dump/vc.sql
# add outputted sql to current commit
git add db_schema_dump/vc.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment