Best practice for managing project variants in Git?

前端 未结 5 2092
闹比i
闹比i 2020-12-31 11:58

I have to develop two Django projects which share 90% of the same code, but have some variations in several applications, templates and within the model itself.

I\'m

5条回答
  •  囚心锁ツ
    2020-12-31 12:30

    Considering it is a Django / Pinax site, with variants scattered around inside several different applications, I would not recommend using submodules.

    The variants should be managed independently in project1 branch and project2 branch, removing the need to "filter" a gitignore result.

    If you identify some really common codes, they may end up in a third repo you could then "subtree merged" to project1 and project2 repositories (the meaning of subtree merge strategy being illustrated in this SO answer)

提交回复
热议问题