Version control system with several similar projects (one is for each client of the same product)

I have several SW projects from different clients with whom I implement a git version control system, and I would like to know that this is the best way to do this. Projects are similar and most often produced from existing ones, but unique to each client. I would create a repo for each client or create new branches instead.

+5
source share
4 answers

No one can give you the "best" way with such limited information.

As with many other distributed version control systems, the decision about how you are going to publish your projects (many branches in one repository or several repositories with one / several branches) is largely independent of the most important issues of general history management (how do you will handle the history that Git writes).

First, I would like to focus on determining which bits of data and history should be shared between projects. With impatience, history will entail not only what happened in the past, but also what you expect in the future.

It looks like you can have a basic file set that is common to all of your projects, and then have some files / changes for each project located on top of the basic file set. As a story chart, it might look like this:

        a1--a2--a3    customer-a
       /
o--o--o               base
       \
        b1            customer-b

, , :

        a1--a2--a3--a4------a5    customer-a
       /           /       /
o--o--o--o--o--o--o--o----o       base
       \           \       \
        b1----------b2--b3--b4    customer-b

, , "" - git rebase:

Rebase customer changes on top of four new base changes:

         a1--a2--a3
        /           a1'--a2'--a3'    customer-a
       /           /
o--o--o--o--o--o--o                  base
       \           \
        \           b1'              customer-b
         b1

Another change for B, and two more changes in base:

                      a1'--a2'--a3'
                     /
                    /     a1''--a2''-a3''   customer-a
                   /     /
o--o--o--o--o--o--o--o--o                   base
                   \     \
                    \     b1''--b2'         customer-b
                     \
                      b1'--b2

(base, customer-a, customer-b) , ( , ).

/ , , , /. (, , ), () , (/) . , , .

, ( ). "" ( , ).

, , .

  • , ?
  • ?
    • (, rebase) .
  • , , /​​?
  • ( ) ?
  • (StGit, TopGit, Guilt ..), ?

, Git (, GitHub, git.or.cz, gitorious/gitosis/... ..). /, , ( Git ). - , . , , .

documentation . Git - . Git Computer Scientists Git Git . Git () (Git merge) (Git cherry-pick, Git rebase [-i]) Git .

+14

. . DRY - .

+1

- , . , . .

, single, . , , - ( lib).

. .

+1

: " ".
: ? , .

: " /, " Chris Johnsen answer:

, :

  • ( ),
  • , ( )
  • ( ), , , .
    :
    • .
    • .

push/pull deny , ( Git 8 )

+1

All Articles