How to incorporate WordPress automatic updates with Git as version control? -


i trying find solution difficult task: properly version controlling wordpress, when working automatic updates.

wordpress allows lot of simplicity allowing users update wordpress core files, themes , plugins clicking button. happens when have website under version control git? click "update now" button, our git repo out of sync , therefore defeats purpose of creating git repo in first place.

i have been looking ways around issue , able find different ways structure wordpress installation breaking components git submodules. 1 of popular example wordpress-skeleton template.

although works version control each module / component of wordpress, still not allow user able use automatic updates button within wordpress, update files in production not commit changes git repo.

in ideal world, should able version control files in 1 repository , when click "update now" button, should update our git repo modifications automatically. know how can accomplished?

one of things thinking create plugin listen update events , automatically commit changes hook triggered. not sure if best approach.

please let me know if has better way can accomplish this.

it seems issue "update now" button triggers "update files in production" not part of git repo.

except could: repo git have master branch dedicated wp usual tree structure described in wordpress-skeleton, , second branch monitoring changes files in production.

since git 2.5, can have multiple worktrees per repo (this "out of box part").
means can declare folder (outside of original git repo) working tree of same git repo.

once update has changed "the files in production", simple git add -a; git commit can detect said changes , commit them (in dedicated branch).


Comments

Popular posts from this blog

java - Andrioid studio start fail: Fatal error initializing 'null' -

android - Gradle sync Error:Configuration with name 'default' not found -

StringGrid issue in Delphi XE8 firemonkey mobile app -