Git and WordPress (+ managing plugins and media) Git and WordPress (+ managing plugins and media) wordpress wordpress

Git and WordPress (+ managing plugins and media)


Regarding Concern1, you can isolate those micro changes in a branch.

Basically, your local repo has two branches:

  • one dedicated to your granular commits
  • one (master) for GitHub

You can push everything to:

  • your website, on a bare repo, and then clone it and checkout the "granular" branch.
  • GitHub, with master updated with the "real" commits.

To clean your history and build your real commits, you can rebase the granular branch on top of master in an interactive way:

git checkout mastergit rebase -i granular

That was you pick, squash or edit commits made in granular, replaying a cleaner set of commits on master.
That rewrites granular history, but this is not too bad if nobody pull directly from this branch.
If you want to preserve the granular history, only merge or cherry-pick some commits from granular to master.

There are several example of managing Wordpress with Git:

The last link is the most detailed about the WordPress upgrade process, and ends also with a rebase of your modifications;