简体   繁体   English

分层版本控制?

[英]Layered Version Control?

I am looking for a version control system which has a specific feature, that I'm not sure what to call besides "layered". 我正在寻找一种具有特定功能的版本控制系统,除了“分层”之外,我不确定该调用什么。 Essentially what I am looking for is to have a "primary" project "A". 本质上,我正在寻找的是拥有一个“主要”项目“ A”。 Let's say it has a directory structure like this: 假设它具有这样的目录结构:

A/
|
+-config/
|
+-src/
|
+-data/

A is where the most of the code is, but I don't want to deploy A , A is more of a template for what I really want to deploy... So I want to have a project B , which has the contents of A (should be read-only), but overlayed with my local stuff such as configurations and data specific to B . A是大部分代码所在的地方,但是我不想部署AA更多地是我真正想要部署的模板...所以我想要一个项目B ,其内容为A (应该是只读的),但是上面覆盖了我的本地内容,例如B配置和数据。

This way, I can make changes in A , then "update" in B which would pull in the changes to the core, but not be effected by the project specific tweaks. 这样,我可以在A进行更改,然后在B进行“更新”,这会将更改引入到核心中,但不受项目特定调整的影响。

If config and data were empty, I could just omit them from A and play games with symlinks and such, but I do want them to be able to hold some core config and data files as well. 如果configdata为空,我可以从A中省略它们,并使用符号链接等玩游戏,但我确实希望它们也能够容纳一些核心配置和数据文件。

Is there a version control system which supports this type of thing? 是否有一个支持这种类型的东西的版本控制系统? If so, how does it work? 如果是这样,它如何运作?

It sounds like you are looking for the concept of a "branch", with deployment branches where you make configuration changes but not core changes. 听起来您正在寻找“分支”的概念,而部署分支是您在其中进行配置更改而不是核心更改的地方。 You can then merge the core changes into your deployment branches from time to time. 然后,您可以不时将核心更改合并到部署分支中。

Any modern version control system for code supports branches. 任何用于代码的现代版本控制系统都支持分支。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM