How to keep trellis updated when using trellis-cli?

Hello everyone,

I am working on converting my website over to using trellis, bedrock and eventually sage template.

First step is to make sure I set up my development environment correctly so I can avoid hassle down the line keeping up with the latest changes to trellis, bedrock and sage.

I have done the following so far:

Installed trellis and bedrock with trellis new
Opened a new workspace in vscode by going into the new directory and code . to open the editor
Once in the editor I have changed directory into the site folder and created a new git using git init

This is where I have stopped and I have the following questions:

  1. How can I keep up with any changes to Bedrock: GitHub - roots/bedrock: WordPress boilerplate with Composer, easier configuration, and an improved folder structure
  2. How can I keep up with any changes to Trellis:
  3. How can I keep up with any changes to Sage:

For example, I see there are currently new commits to the Trellis master branch that have not been put into a release. These are actually changes I will want to have once a new release is made, or even right at this time but I also will be creating new collections and roles I will want to use as well and have tracked.

I guess my overall question is if you are using trellis-cli to create a new project, what is your development work flow for keeping up with the latest roots releases for these three projects, while also adding new things, such as collections to the project as well?

Thanks for your time and I am excited about the idea of Bedrock and Trellis and making WordPress a much more enjoyable experience to develop on.

So for my Trellis projects I use a git repository with a separate branch. When I want to update from upstream, I fetch and merge all changes into the separate branch. This often requires manual reviewing and merging.
The same for Bedrock sites and Sage themes, though I do not have a separate branch for upstream there, but rather create a new Bedrock site or Sage theme (using composer create) and put the existing theme files on top and then resolve and adjust everything before committing.


Thanks for sharing your method. I’ll consider that path and wait to see if others contribute theirs.

I also use separate branches for Trellis and Bedrock with my own customizations, which I use as boilerplates for starting a new project. Down the road for any of my projects, if I need to update and get the latest version for either Trellis or Bedrock, I either commit or stash my edits, and git pull --rebase from either Trellis master or my custom branch so my edits are always on top. I was having a similar discussion recently.

1 Like

Hi @BWBama85 - maybe you are not aware, but you can use trellis along trellis-cli.

Let’s say you created a repository with your own modifications of trellis. You can git clone that repository into a local directory, then run trellis init. This will create a virtual environment and also give you access to the nifty trellis-cli functionality.