什么文件应该存储在版本控制中,应该如何存储? [英] What documents should be stored in version control and how should they be stored?

查看:131
本文介绍了什么文件应该存储在版本控制中,应该如何存储?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现了一些类似的问题( here 这里 here )询问将文件存储到版本控制中。我有一个更具体的要求和一般的问题。具体要求是我想使用Git。更一般的问题是,文档(用于项目的设计,测试,一般做法,提示等)应如何存储在Git中?更广泛地说,应该存储什么文件?

I've found some similar questions (here, here, and here) asking about storing documents into version control. I have a more specific requirement and general question. The specific requirement is that I want to use Git. The more general question is, how should documents (for design, test, general practices, tips, etc, of a project) be stored in Git? More broadly, what documents should be stored?

我可以想到几种方法:


  1. Word / Open Office文档。新的Office Word具有docx格式,它会压缩文档,但它也具有解压缩的XML格式,可用于在Git中有效地存储差异。差异功能仍然被打破,因为XML在一行上被压缩。这不比将二进制文件存入Git。

  2. 维基。那里存在什么分布式维基这就像是一些Latex的事情,文件被编写/看作是一个维基。

  3. 乳胶 - 但是从使用它的论文,我觉得它不太适合文档。有文件等同吗? (如何编写手册页?)

  4. 纯文本格式,但由于缺少图表而缺点,这带来了另一点。

  1. Word / Open Office documents. The new Office Word has docx format, which zips up documents, but it also has an unzipped XML format, which could be used to efficiently store diffs in Git. The diff feature is still broken though, since the XMLs are squished on a single line. This is no better than storing a binary file into Git.
  2. Wiki. What distributed wikis exist out there? It'd be like some kind of Latex thing where documents are written and compiled / viewed as a wiki.
  3. Latex - but from using it for papers I find it pretty unsuitable for documents. Is there a documentation equivalent? (How are man pages written?)
  4. Plain text formats, but this is rather lacking due to lack of diagrams, which bring up another point.


    如何存储视觉效果?首先要组合什么?我正在Linux环境中开发,但项目中的其他一些参与者都在Windows上。什么跨平台的解决方案就像Visio一样?当然,它不应该创建要存储到Git中的二进制文件。那么这样与文件有关系呢? (例如类似于Latex可以在编译时参考其他图表)。

How should visuals be stored? What should they be composed in in the first place? I'm developing on a Linux environment, but some other participants in the project are on Windows. What cross-platform solution is there that resembles Visio? And of course, it should not create binary files to be stored into Git. How then would this tie in with documentation? (E.g. Similar to how Latex can reference other diagrams when compiled.)

推荐答案

在决定您选择的文档格式时,您应该确保团队成员(或者你独自工作吗?)使用格式本身很舒服。

When deciding what document format you choose, you should make sure that team members (or are you working alone?) are comfortable working with the format itself.


  1. 存储不是很多问题是可以看到版本之间的差异和合并。根据我的经验,没有任何文字格式可以在任何文本编辑器中自由编辑。这不包括HTML和任何基于XML的格式。 DocBook是一个几乎不可用的异常。

  1. Storage is not so much the problem as is being able to see diffs between versions and merging. In my experience, nothing beats text formats that can be edited freely in any text editor. This excludes HTML and about any XML-based format. DocBook being a barely usable exception.

可以使用任何流行版本控制系统并以分布式方式设置的一个好的wiki是 IkiWiki 。使用IkiWiki,标记解析是在插件中完成的,因此您可以在每个文档的基础上选择输入格式。 Markdown 的默认非常接近纯文本格式。

A good wiki that can use any of the popular version control systems and be set up in a distributed fashion is IkiWiki. With IkiWiki, markup parsing is done in plug-ins, so you can choose input format on a per-document basis. The "default", Markdown gets pretty close to plain-text formats.

如果您对使用LaTeX不满意,请勿使用。我认为不适合快速笔记。人造页是用nroff编写的,但是很多人使用其他格式,例如 POD

If you're unhappy with using LaTeX, don't use it. I think it's unsuitable for taking quick notes. Man pages are written in nroff, but many people use other formats such as POD.

有些旨在替代Visio的项目是Kivio(KDE)和Dia(Gtk / Gnome)。我没有使用Visio本身,所以我不能评论他们的功能集。这可能取决于要创建的各种视觉/图表。 UML?流程图?

Some projects that strive to be alternatives to Visio are Kivio (KDE) and Dia (Gtk/Gnome). I haven't used Visio itself, so I can't comment on their feature sets. It probably depends on what sorts of visuals / diagrams you want to create. UML? Flow charts?

这篇关于什么文件应该存储在版本控制中,应该如何存储?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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