How to handle specific customizations with git

Asked

Viewed 40 times

1

Where I work, we follow the following methodology when working with git

  • We have a production branch
  • We have an approval branch
  • And we create branchs for every development sprint

But the need arose to create specific customizations for some customers, what would be the most correct way to see the same? Creating a client branch with its customizations?

If necessary, I accept suggestions to improve our current development flow

  • 1

    Do they all use the same code base? If so, maybe submodule strategy would be best, no?

  • 1

    I think the recommended would be something like Gitflow suggests https://medium.com/trainingcenter/utilizando-o-fluxo-git-flow-e63d5e0d5e04

  • 1

    @hugocsl as I understand it, they kind of already use git-flow, only they want to create "subprojects" in which they descend from the main project and it’s customized for each client

  • Exactly @Felipeavelar, that’s the idea and answering your question, yes all use the same basis, changes for each customer are small, especially in the way information is displayed

1 answer

1

From the information you pass on the question, what you seem to need is submodules of a parent project.

In case your main project will be a superproject will have several sub-modules and each client customization will be a sub-module, so the changes of these customizations will be "isolated" within each sub-module, being replicable throughout your repository. This will isolate the changes so that for each customer, you can generate a different end product.

To summarize, the concept of superproject, according to git is:

Sometimes developers want to get a combination of subdirectories of a large project, depending on which team they are on. This is common if you are coming from CVS or Subversion, where you define a module or a collection of subdirectories, and you want to maintain this kind of workflow.

A good way to do this in Git is to make each subfolder a separate Git repository and then create a repository for a parent project that contains multiple submodules. The advantage of this way is that you can more specifically define the relationships between projects with tags and branches in the parent project.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.