This is more a git question than a WordPress one IMHO, but what you need to do is write a bash script and associate with a git hook that does what you want.
Related Posts:
- version control for wordpress? (wordpress folder and database at same time)
- Keeping WP database synced across multiple developers using git
- Solution for database version control and deployment?
- Migrating data between local and development server
- Syncing local content with development / staging sites
- Trigger Plugin database update after git pull
- How to get the SQL of the changes made to the database from an update or upgrade?
- SymmetricDS in dev + prod workflow?
- Is there an actual way to synchronize ‘production’ and ‘develop’ WordPress databases?
- Working local with one database
- What is the difference between an ORM and an ODM?
- How do I rename a local Git branch?
- How should I tackle –secure-file-priv in MySQL?
- Git: How to squash all commits on branch
- git push to specific branch
- Checking if Database Table exists
- How To Export/Import WordPress (MySQL) Database Properly Via Command-Line?
- Is it possible to define two databases for one installation?
- Has parent field in the table wp_term_taxonomy has term_id or term_taxonomy_id
- Hook into $wpdb
- Export WP database for import using WP-CLI on Vagrant Box
- Improve or optimize a very slow query
- What is the advantage of separating wp_users and wp_usermeta table?
- Showing content from another wordpress installation database in the page template loop?
- Huge wp_options table
- Updating all rows of table with $wpdb
- What actions affect files, DB, or both?
- Is $wpdb->prepare escaping to much? How to use it properly?
- What is the purpose of storing `siteurl` in database?
- How to log database changes during an upgrade?
- Using same database for main and subdomain
- Emojis getting converted to “?”
- Building a Scalable Resiliant WP Setup
- Single database for multiple instances
- Search and replace special characters (å,ä,ö) for image attachments only in database
- Accidentally deleted active_plugins portion of the wp_options DB table
- Automate dir and DB stack creation with WP-CLI
- Moving WP from local server to live, error establishing a db connection
- delete post meta from db, even if does not exist?
- WordPress and MySQL: how to transfer Meta_key and Meta_Value from one post_id to another
- Where does the actual data stored by add_post_meta
- Exporting table to csv works in the admin but exports HTML data when used on the front end
- wp search-replace (not executing)
- Import users from old WP site to new one
- Create table from array with prepare
- Migrate database between 2 different wordpress version
- SSO system between 2 WordPress installs on different servers
- Form that sends data to an admin panel and can export it
- All text disappeared (seems to be a database problem) [closed]
- is $wpdb->get_results() safe enough
- Convert user passwords to MD5?
- is wordpress stores Role Id in WP database?
- Why do database examples sometimes finish with an add_option call?
- Does post_meta data need to be unserialzed?
- Can’t update WordFence Options, clear data manually
- How to backup my site and restore my wordpress site
- Is it possible to have more than 1 MySQL database in my WordPress blog?
- How to fetch records from database WordPress
- AJAX wp-mysql running too slow
- Delete/Replace words from X to Y in post content
- How get Data form wordpress database as array not stdclass?
- cannot connect database
- Multiple WordPress sites installs sharing the same database but with different content and domains
- Brandoo WordPress Unable to Update to WordPress 4.2.2
- Connecting to wordpress database in my application [closed]
- Remote database -> massive response time increase?
- Custom Post Type not showing anything added by code anymore?
- How do I have a user upload a blog post and then retrieve that to display in a card on the site?
- Delete user with only subscriber role
- WordPress keeps redirecting to localhost
- get value from ‘terms’ table
- How to rename custom table name programatically in wordpress?
- Displaying requested data from a the database in wordpress
- How to edit custom table data in frontend
- pre_get_posts causings DB error when using ( ‘posts_per_page’, -1)?
- generate PDF from member information
- mysqli_query(): MySQL server has gone away for Curl Request
- Help posting values to DB on submit using $wpdb->query
- WP website showing blank page after moving from subdomain to main domain
- create a table using user meta custom data
- wpdb query to insert images in to post/page gallery
- Creating a database in my plugin not working
- How to create index (sql) to a meta_key?
- WPCLI search and replace in a particlar site dir effect another site-dir
- get_user_meta and umeta_id
- $wpdb not working
- Database error after importing WordPress
- Send data to database after redirect (and popping out of iframe)
- Simple email input store in database
- Pulling values from a sepcific row in table
- import (migration) user database to wp-users
- What is best for saving lot of extra detail of user?
- Insert Extra fields added in the front end registration form to DB
- $wpdb->insert not working for last select option
- How to create a table [closed]
- Upload wordpress from localhost to 000webhost
- wp_usermeta key problem
- How to properly configure SSL connection to remote azure database for running queries within a WordPress environment
- Database Queries are crashing the server
- Uploading to WordPress Database