I am writing a piece of software and and I am about to release three versions of it, a Lite version, a Pro version and an Enterprise version.
This three versions have some common features, but also, there are some features in each version, that is not present in other versions. Something like the following figure:
To manage these versions, I have two approaches in mind (using git):
1: Create a branch for the common features, and another branch for each version. Then merge in the common branch into each version when needed.
2: Create a repository for the common features and fork it into three other repositories for each version. Then pull in the common feature from the main repo (upstream) into each version's repo, when needed.
I wonder which of these approaches is better or if there is a better approach (with or without using git) to achieve the result.
Update Unfortunately this software was originally written by some other guys, and it lacks structure. It is too coupled and most likely, it is not possible to break it down into smaller modules, unless written over from scratch.