Package development and source control best practices

git
rstudioconnect
packages

#1

Dear all,
I’m hoping to pick the collective brain with regards to source control and r packages/products. In short, my team is developing a slew of r-based products including APIs, shiny dashboards, markdown rapports etc. Many of these rely on internal packages. For products that are consumed in production, we have separate dev, test and prod environments. We use git.

What would be a good design pattern in order to support this, in terms of SCM? Separate branches for each environment, eg to track which code is currently in test, prod, etc. What about package/api versions? Should one use tags? Or keep separate branches for all released versions?

There seems to be many ways to do this. Any insights are appreciated.
Thanks
JW