Git vs Child Theme

While I know version control approach to be used in practice, I don’t think it’s too common. WP has weak version control practices in general, so development of extensions doesn’t quite plan for such.

Example of specific scenario which will cause issues might be changes in template hierarchy. Let’s say you customized single.php in version control. Then upstream theme rearranged things and got rid of single.php altogether in favor of more generic singular.php. Suddenly your changes hang in the air without template to apply them to, essentially your merge is blocked and you have to re-develop your changes on top of a new situation.

With child theme your template will stay in place and continue to work, although occasional updates will be required in some cases as well.

In a nutshell I would consider version control to be essentially a fork to maintain, while child theme would be a downstream extension (under your full control) with upstream dependency.

In my subjective opinion maintaining a fork would be harder on resources in most cases. I would reserve it to solutions which cannot be achieved with a child theme.

Leave a Comment