Single repository – multiple branches

A much better approach would be to still use a single repository but maintain a different branch (in Git terminology) for each major package version, extra feature, or development branches for ongoing work. If we were to apply this approach to the case of the weather package that we discussed before, our repository would normally contain the following branches:

  • v1: This is the branch where the released 1.x.y line of the weather package is located.
  • v2: Another branch for the 2.x.y release of the weather package.
  • develop: Code in development branches is generally considered to be work in progress, and therefore unstable for use. Eventually, once the code stabilizes, it will be merged back into one or more ...

Get Hands-On Software Engineering with Golang now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.