如何在Git中对项目时间表,待办事项,维基等进行版本控制? [英] How to version project schedules, to-dos, wikis etc. in Git?

查看:82
本文介绍了如何在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中对项目时间表,待办事项,维基等进行版本控制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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