In my personal opinion, everything must be done exactly the opposite.
You change the site directly and want to save changes after the fact.
- As a result, you will only have information about which day a particular row changed, but no information about the exact time and the author of the change. And when there is no information about the author, there is no responsibility.
- And more changes made during the day will not have a backup.
- Changes will also not have a meaningful comment. Why did they change or add something? A week later, no one will remember.
Consider that you buy a subscription for packs. In other words, technically your task is solved very easily (cron + git), but this task will not bring you closer to your goal - backups and reporting changes.
A much more reliable way is to carry out all changes at once and exclusively through git, deploying the combat environment from a specific branch (usually master or production ). There are many ways to deploy a site from git and they are beyond the scope of this question.
The point is this: if someone wants to change even one line - commits to the branch from which the site is deployed. If this commit is broken, we roll back to the past and draw conclusions.
It is very good and reliable to use the test environment, so as not to roll out immediately to the battle. In this case, you either expand the site to the test environment from each feature-branch, or from one in which the feature-branches are merged. Quite a common practice: master takes place on the stage, production takes place on the battlefield.
About the deployment of sites from git:
About the work model and releases (every change in battle is a release, albeit a small one)