Git workflow for custom css files and themes

空扰寡人 提交于 2019-12-29 06:26:28

问题


I have a web app under source control in git. I have different css files for different customers as well as images and other theme specific things. And also custom reports... Beside the theme things every other aspect of the app stays the same. What would be a recommended way to keep the app as well as the theme information under source control in git. Should I use branches for the theme and the reports or submodules... During development I would like to like my customers theme to to my dev branch and do changes that I commit to my customer specific theme...

Is something like the possible with GIT?


回答1:


Branches are one way to do it, but since Git is a DVCS, you need to deals with the publication aspect as well (which is orthogonal to branching): what to push to another repo and where?.
Meaning if you start by managing branches for each client, you really need to remember:

  1. to update to branches with the common code (git rebase --interactive) to replay client-specific commits on top of common development commits (which are on the 'dev' branch foir instance).
  2. to push the right branch to the right remote repo in order to publish the right changes.

For this kind of development structure (one common module, several client-specific modules), I would consider a component approach and use git submodules.

  • one independent repo for all the common code
  • one repo per client for al the css, report and theme files
  • one parent repo per client which would aggregate the right versions of the rights submodules in order to build, and publish the client web app.


来源:https://stackoverflow.com/questions/3223922/git-workflow-for-custom-css-files-and-themes

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!