0

I have an app with different version.

But every version have different Git repository.
So please let me know how we can manage that every build variant have different repository.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
Amit Sharma
  • 926
  • 2
  • 10
  • 35

1 Answers1

1

You should have different tags or branches per version, not different repositories.

From the same repo, you would then use git worktree in order to clone the repo once, but checkout the repo multiple times: see "Multiple working directories with Git?".
That way, you have different folders, each one with a different version of your project.

Since only the name/color/logo are changing, you would need:

  • one repo with all the common code
  • one configuration file with the right values for name/color/logo per environment
  • one way for your code to detect in which environment it is deployed: your code you then pick the right value from the config file.

The point is: one project, one Git repo: See the 12 factors app (in particular, the Config section).

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • actually problem is i have already created the 4 projects, which are same only color ,logo and name is change , and they have different git repo. and projects are live. Recently i have heard about the Build variant so need a solutions for this – Amit Sharma Dec 19 '17 at 05:42