如何在Git中对项目时间表,待办事项,维基等进行版本控制?

编程入门 行业动态 更新时间:2024-10-26 13:30:25
本文介绍了如何在Git中对项目时间表,待办事项,维基等进行版本控制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

在我的几乎所有项目中,从文件内容应该在所有分支之间共享的意义上讲,我几乎没有项目范围内的"文件.这些文件通常包括项目进度表,待办事项列表,Wiki等.目前,我将它们包含在.gitignore中,因此无论我检出了哪个分支,都不会对其进行版本控制但保持相同.但是,我真的很想以一种与源代码的正交"正交的方式对它们进行版本控制. git不用太多痛苦就能做到吗?

In almost all of my projects I have few files that are "project wide" in the sense that their contents should be shared across all branches. These files usually include project schedules, to-do lists, wikis, and the like. Currently I have them included .gitignore so that they are not versioned but remain the same no matter what branch I have checked out. However I'd really love to have them versioned in a way that is "orthogonal" to the versioning of the source code. Is this possible with git without too much pain?

推荐答案

您可以将这些文件(wiki,todo等)保存在专用的Git存储库中,然后通过子树合并策略(如此问题).

You could have those files (wiki, todo and so forth) in their dedicated Git repository, and then add them to a development repository through the subtree merge strategy (as described in this question).

这样,它们将包含在任何开发中,并且也会由这些子项目进行更新.

That way, they get included in any development, and they also get updated by those sub-projects.

然后,子项目对分支所做的任何修改都可以合并回到原始"wiki" Git存储库中的主"分支中,并且所有子项目都可以将自己的开发分支与该主"wiki"合并"分支,以更新通过子树合并包含的内容.

Any modification in a branch doen by a sub-project can then be merged back in a "main" branch in the original "wiki" Git repository, and all sub-projects can merge their own development branch with that main "wiki" branch in order to update this content included through a subtree merge.

并非完全是正交"版本,但仍然是一种实用的解决方案.

Not exactly an "orthogonal" versionning, but still a practical solution.

更多推荐

如何在Git中对项目时间表,待办事项,维基等进行版本控制?

本文发布于:2023-11-08 06:47:58,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1568639.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:中对   时间表   事项   版本   项目

发布评论

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

>www.elefans.com

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