hobuci
hobuci

Reputation: 51

Git: How can you manage multiple related projects in the same repo?

I’ve been developing a webapp that will now become a template for 3-4 different webapps. The core of each apps functionality will stay the same, about 70% of the code will be used by each app, the rest will differ in functionality, user roles, design, etc.

I would like to have the ability to update them separately of course. And also to have a simple method to fix bugs in the main template and implement features to all projects at once.

Upvotes: 0

Views: 250

Answers (1)

Lajos Arpad
Lajos Arpad

Reputation: 77002

The simplest approach is to always clone your template and then add a new remote, so and from this position, apply two strategies:

Template changes

Template changes will only occur on the template project, never from its "clients". Its clients will only pull from the template.

Client projects

Your client projects will pull from the template whenever a new version is ready and, besides that, will operate normally.

Naturally, you could do this using your favorite git-based application, like GitHub fork, for example.

Upvotes: 2

Related Questions