Sage/bedrock/trellis workflow with Git and Github

Are there some good starter tips for how to work with sage/bedrock/trellis and combine it with git and github? Do we push the whole project up to github, or just the theme? I’m new to version control and would appreciate any tips on how to get started with a professional workflow.

Our official example project is what we recommend:

I have set up my project in the same way as your Roots Example Project.

It seems wise to rm -rf <repo>/.git for each repo, and then set up one overarching repo of our own to commit our changes to.

However, what do we do when you update Sage/Bedrock/Trellis? It would be great to be able to keep up to date with your changes.

One solution could be to re-clone your projects back into our own, then do a git diff, and then try to separate the changes we want to keep from the changes we don’t.

Could there be a better way though? It seems to me that Sage/Bedrock/Trellis are ‘dependencies’ of our own project, and perhaps should be installed as such. But then I suppose we’d lose some flexibility of customisation - at present, we can entirely rewrite the playbooks to suit our own needs.

Not sure what the solution is - just wondering if it’s something you’re thinking about at Roots, and whether you have a process for it?

@discopatrick there’s a bunch of threads/replies on this forum with strategies for keeping our projects up to date. Unfortunately none of them can really be used as “proper” dependencies. So keeping them up to date will always be a more manual process.

The key is Git “remotes”. You can add our “upstream” repos as remotes and selectively pull them down and merge in commits. You just need to resolve the conflicts manually.