astrasleepz
astrasleepz

Reputation: 404

How to strategically deploy many versions using git?

I want to make 10 landing pages and I've been thinking to use git to apply this project. What I'm trying to do is to make 10 different versions of landing pages and I would like to be able to checkout to each of these version. How do I strategically do this?

Should I create 10 different branches say git branch ver1, ver2, ver3... ver10? Or should I create version tags? But using a version tag I always ended up in detached HEAD state whenever I tried to checkout to tags. Is this a problem?

Master of git please help me configure.

Thanks!

Upvotes: 1

Views: 45

Answers (1)

VonC
VonC

Reputation: 1326556

Creating 10 branches allows you to manage 10 different history for your landing page.

Depending on the type of variation, you can also consider (as I mentioned in this answer):

  • one branch
  • one script able to generate the landing page base on the environment (like an environment variable)
  • a smudge content filter driver which would, on checkout, automatically generate the right landing page.

enter image description here

(image shown in "Customizing Git - Git Attributes", from "Pro Git book")

If the differences are important between the 10 versions, option 1 is recommended.
But if the differences can be automatically generated, option 2 can be a good fit.

Upvotes: 1

Related Questions