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
- How do I delete a Git branch locally and remotely?
- What is an ORM, how does it work, and how should I use one? [closed]
- What is the difference between an ORM and an ODM?
- How do I delete a Git branch locally and remotely?
- How do I rename a local Git branch?
- How do I undo the most recent local commits in Git?
- Git: How do I force “git pull” to overwrite local files?
- Differences between git pull origin master & git pull origin/master
- How do I rename a local Git branch?
- How can I switch to another branch in git?
- How do I discard unstaged changes in Git?
- Git: How do I force “git pull” to overwrite local files?
- How do I discard unstaged changes in Git?
- Download single files from GitHub
- How can I make git accept a self signed certificate?
- What is this JavaScript “require”?
- Rename a table in MySQL
- How should I tackle –secure-file-priv in MySQL?
- What is this JavaScript “require”?
- What is “Advanced” SQL?
- Git: How to squash all commits on branch
- What’s the difference between identifying and non-identifying relationships?
- How can I revert multiple Git commits (already pushed) to a published repository?
- Undo git pull, how to bring repos to old state
- Can’t connect to MySQL server on ‘127.0.0.1’ (10061) (2003)
- Can’t connect to MySQL server on ‘127.0.0.1’ (10061) (2003)
- What does “Git push non-fast-forward updates were rejected” mean?
- Can’t connect to MySQL server on ‘127.0.0.1’ (10061) (2003)
- What is the difference between ‘git pull’ and ‘git fetch’?
- Undo git pull, how to bring repos to old state
- What are the differences between B trees and B+ trees?
- Git: cannot do a partial commit during a merge (SourceTree)
- Git: How do I force “git pull” to overwrite local files?
- What is the meaning of git reset –hard origin/master?
- How can I reset or revert a file to a specific revision?
- Else clause on Python while statement
- MySQL SELECT increment counter
- Delete all local git branches
- How to resolve ORA-011033: ORACLE initialization or shutdown in progress
- Example of a strong and weak entity types
- Why does ‘git commit’ not save my changes?
- How can I undo git reset –hard HEAD~1?
- Set up git to pull and push all branches
- git push to specific branch
- Get changes from master into branch in Git
- Invalid VCS root mapping – 3 errors on my project
- Updates were rejected because the remote contains work that you do not have locally
- Oracle SQL query for Date format
- how to reset develop branch to master
- phpMyAdmin – Error > Incorrect format parameter?
- Do I commit the package-lock.json file created by npm 5?
- Strange Characters in database text: Ã, Ã, ¢, â‚ €,
- Difference between partition key, composite key and clustering key in Cassandra?
- How SID is different from Service name in Oracle tnsnames.ora
- What is a relation in database terminology?
- Failed to connect to mysql at 127.0.0.1:3306 with user root access denied for user ‘root’@’localhost'(using password:YES)
- Database vs File system storage
- Rebasing remote branches in Git
- How can I see the changes in a Git commit?
- Can I have multiple primary keys in a single table?
- What is the Git equivalent for revision number?
- How can I delete all Git branches which have been merged?
- difference between git merge origin/master and git pull
- Exclude Statement in SQL
- How do you query for “is not null” in Mongo?
- What is a file based database?
- What’s a good (free) visual merge tool for Git? (on windows)
- Is it fine to have foreign key as primary key?
- Storing Images in DB – Yea or Nay?
- Using wpdb to connect to a separate database
- how to Optimize WordPress database for 10 million post? [duplicate]
- MySQL Database User: Which Privileges are needed?
- Why is my database import losing text widget data?
- Database synchronization between dev/staging and production
- Getting Started with Subversion, Git, or similar Version Control System to keep a History of my Files? [closed]
- WPDB Insert or if exists Update
- Multiple developers / editors working on a site in progress
- How can I make updates to a site, on a development copy, but then move updates back without overriding live site’s evolving database?
- get_results using wpdb
- Will it break my site if I delete all transient records in wp_options table?
- Checking if Database Table exists
- Why WordPress choose data serialization over json_encode?
- What’s the simplest way to backup my WordPress database?
- WordPress (MyISAM) database is slow, should I switch to InnoDB?
- $wpdb won’t insert NULL into table column
- Relaunch 4.2 utf8mb4 database upgrade
- Fastest way (least amount of steps) to locally import a remote database using WP-CLI
- Safest way to bulk delete post revisions
- Please explain how WordPress works with MySQL character set and collation at a low level
- The MySQL alternatives: Do Percona Server and MariaDB work well with WordPress, and do they make WordPress go better?