Let me apply revision control - using git - to my WordPress-based web development.

According to my concerns below, how do you start?

Concern 1: Pushing "granular changes"
Within this specific situation, it's tough to mimic the webserver atmosphere in your area. Therefore, I must push changes very frequently. Could I push changes on the "sub-commit level" towards the webserver to prevent "irrelevant" commits? (And must i setup a git repo on my small remote webserver whatsoever?)

Concern 2: Wordpress plugin and media handling
Formerly, me and my co-workers happen to be setting up/updateing plug ins and submitted media from WordPress' admin interface. If I'd like to help keep media and plug ins synchronized, wouldso would this be accomplished?

I'd appreciate any assets detailing how to setup a workflow which may let me keep my files (WordPress + plug ins, media, styles etc.) in your area, yet still permitting me to push "granular changes" to my webserver and "real commits" to Github.

Regarding Concern1, you are able to isolate individuals micro alterations in a branch.

Essentially, the local repo has two branches:

  • one devoted for your granular commits
  • one (master) for GitHub

You are able to push everything to:

  • your site, on the bare repo, after which clone it and checkout the "granular" branch.
  • GitHub, with master up-to-date using the "real" commits.

To wash your background and construct your real commits, you are able to rebase the granular branch on the top of master within an interactive way:

git checkout master

git rebase -i granular

Which was you choose, squash or edit commits produced in granular, replaying a cleaner group of commits on master.
That rewrites granular history, but this isn't bad if nobody pull from this branch.
If you wish to preserve the granular history, only merge or cherry-pick some commits from granular to master.

You will find several illustration of controlling Wordpress with Git:

The final link is easily the most detailed concerning the WordPress upgrade process, and finishes also having a rebase of the modifications