自定义CSS文件和主题的Git工作流程 [英] Git workflow for custom css files and themes

查看:94
本文介绍了自定义CSS文件和主题的Git工作流程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在git的源代码控制下有一个web应用程序。
我为不同的客户提供不同的css文件以及图像和其他主题特定的东西。还有自定义报告...
除了主题之外,应用程序的其他各个方面都保持不变。
在git中,将源代码控制下的应用程序以及主题信息保留下来的建议方式是什么?
我应该使用分支作为主题和报表还是子模块...
在开发过程中,我希望将我的客户主题发送给我的开发分支,并对我的客户特定主题进行更改。 ..



类似于GIT的可能性吗?

解决方案

分支是实现它的一种方式,但由于Git是DVCS,因此您还需要处理发布方面(这是正交于分支):推到另一个回购和什么地方?什么意思,如果你开始管理每个客户的分支,你真的需要要记住:使用公共代码( git rebase --interactive


  1. c>)在公共开发提交(位于' dev '分支实例)上重播客户特定的提交。

  2. 将右分支推送到右边的远程仓库以发布正确的更改。



<对于这种开发结构(一个通用模块,几个特定于客户端的模块),我会考虑一个组件方法并使用 git submodules


  • 所有通用代码的独立回购

  • 每个客户端的css,report和主题文件一个repo
  • 每个客户端的一个父资源库,它将聚合权限子模块的正确版本以构建并发布客户端Web应用程序。


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?

解决方案

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.

这篇关于自定义CSS文件和主题的Git工作流程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆