Manage multiple versions of a project

I suppose this is a pretty noob question, but I haven’t found an answer that satisfy me. I want to achieve the following:

  1. I have a project with repository with a master-branch which contains the currently released version of the project. (I use tags to mark every release)
  2. The customer now have a bunch of changes that needs to be applied, in many ways changing basic functionality of the project, or at least change the way certain things are being handled. I feel that the changes are major so a release 2.0 is motivated.
  3. However I still need to maintain version 1.0.x as this version is used for other customers.

My first idea was to create a fork, but they can´t be placed within the same group which causes un non logical structure for me. So, what would you say is the best way to maintain multiple major versions of a project?

image

Probably the easiest way is create branches for each version and then do for example git checkout v1.0.14 or whatever branch you want to work on. The clients can then also check out the appropriate branch for the one they need as well as when upgrading to next version. Your master branch would therefore become redundant.

1 Like