Version control good practices

For control versioning of WP theme, what is the best practice ?

  1. To manage it with the GIT repo of entire bedrock project (the same repo used to provision).
  2. To have a separate GIT repo just for the theme?

Thanks.

This is completely dependent on your project, and opinions.

The suggestion generally is to include the theme in the project repo, simply because it most likely is a unique theme specific to your project.

The only time I would suggest considering moving a theme to it’s own repository would be if you plan on re-using the theme in another project, then obviously you would want to keep the theme in one repository to make edits to it and have that available to any project. Possibly also consider keeping the theme in it’s own repository if you plan on making it public for some reason, on Github or something.

1 Like

There is a third option I’m thinking in. A bedrock project with its GIT repo and a theme inside with another GIT repo too. Something like a GIT repo nested inside other. Is it possible? Thus, during theme developing time, I can have a GIT focused specifically on theme.

This is basically what I said, but no, you would not have a git repo within a git repo. If you try to commit a git repo within a git repo there is confusion. You would just have a separate repo with the theme, and in your Bedrock project the theme folder would be part of the git ignored list.

1 Like

This topic was automatically closed after 4 hours. New replies are no longer allowed.