自定义CSS文件和主题的Git工作流程

编程入门 行业动态 更新时间:2024-10-18 18:22:40
本文介绍了自定义CSS文件和主题的Git工作流程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

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

类似于GIT的可能性吗?

解决方案

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

  • c>)在公共开发提交(位于' dev '分支实例)上重播客户特定的提交。
  • 将右分支推送到右边的远程仓库以发布正确的更改。

    <对于这种开发结构(一个通用模块,几个特定于客户端的模块),我会考虑一个组件方法并使用 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:

  • 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).
  • 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工作流程

    本文发布于:2023-11-28 13:57:33,感谢您对本站的认可!
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:自定义   工作流程   文件   主题   CSS

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!