我有一份公司手册,我试图将其置于版本控制之下,我可以使用一些建议。该手册需要分发给不同的部门,虽然无论分发给哪个部门,手册的某些部分都是相同的,但对于会计、人力资源、IT 等,某些部分是不同的。
是否可以使用分支来编写手册我可以将手册放在 /trunk 中,然后为每个单独的部门创建分支 - 或者类似的东西?我不想为每个部门使用不同的 Word 文档,因为手册的大部分内容都是相同的。
所以我的目标是,如果我在所有部门都相同的部分中发现拼写错误,那么我希望能够在全局范围内纠正一次,而不是必须在五个不同的 Word 文档中进行更改。
但我也担心如何使用手册中不同的特定部分。如果某个区域有特定于部门的示例,我该如何制作,以便我可以拥有一个包含会计部门特定示例的版本(分支?)和另一个包含 IT 部门的版本(分支?)-具体例子?
如果分支/合并是可行的方法,那么 Mercurial 是比 SVN 更好的选择吗?我是版本控制新手,很少使用 SVN,总体来说我很高兴,但是有一次我需要合并并不是一次愉快的经历。我读到人们似乎更喜欢 Mercurial 与 svn 进行合并,虽然我不希望这个问题是关于 SVN 与 Mercurial 的,但在我的具体情况下,使用 Mercurial 与 SVN 进行分支/合并是否更容易?
I have a company manual that I'm trying to keep under version control and I could use some advice. The manual needs to go to different departments, and while certain areas of the manual are the same no matter what department it goes to, some sections are different for Accounting, HR, IT, etc.
Is it possible using branching to have a manual whereby I can have the manual in a /trunk, and then create branches for each individual department -- or something similar? I don't want to have a different word document for each department as much of the manual is the same.
So my goal is that if I find a typo in a section that's the same for all departments, then I'd like to be able to correct it once globally as opposed to have to make the change in five different word documents.
But I'm also concerned about how to work with the specific sections of the manual that are different. If there's an area where there are examples that are department-specific, how do I make it so that I can have one version (branch?) with Accounting Dept.-specific examples and another version (branch?) that has IT Dept.-specific examples?
And if branching/merging is the way to go, is mercurial a better option than SVN? I'm new to version control and I have used SVN sparingly and I'm generally happy, but the one time I needed to merge was not a pleasant experience. I've read that people seem happier with mercurial vs. svn for merging and while I don't want this question to be about SVN vs Mercurial, is it easier to branch/merge with Mercurial vs. SVN in my specific situation?
发布评论
评论(2)
我将比威尔·休斯提议的更进一步两步。不要将文档拆分为 n 个单独的文档:
这样,您只需向用户提供一份文档,其中包含其部门所需的所有部分,并且您将受益于每个部分的修订控制。
I'll go two steps further than what Will Hughes proposed. Instead of splitting the document into n individual documents:
That way, you'll provide only one document to your users, that contains all the needed parts for their departement, and you'll benefit of a per-section revision control.
我怀疑这是否会如你所愿。
Word .doc 文件是二进制格式,不适合您尝试执行的合并类型。
Word .docx 文件实际上是一个 zip 文件,包含文档标记和其他嵌入项目。 (继续,将 .docx 文件重命名为 .zip,然后使用您最喜欢的 zip 工具打开它)。
Word 模板可能可以帮助您解决问题,但我想说您在维护它时会遇到比其价值更多的麻烦,而且您将无法来回合并。
您最好的选择可能是将您的文档分成“公司范围”和“部门特定”文档。
当新员工入职时,您只需向他们提供公司范围内的政策以及适用于其部门的政策即可。
因此,
Initech 政策
Initech IT 部门政策
Initech 人力资源部政策
I doubt that this will work as you intend.
Word .doc files are a binary format, which is not suitable to the kind of merging that you're trying to do.
Word .docx files are actually a zip file, containing the document markup, and other embedded items. (Go ahead, rename a .docx file to .zip, and then open it using your favourite zip tool).
A Word template may get you part way, but I'd say you'll have more trouble maintaining it than it's worth, and you won't have the ability to merge back and forth.
Your best bet is probably to just split your document into 'company wide' and 'department specific' documents.
When a new employee comes onboard - you simply give them the company-wide policies, plus the policies applicable to their department.
So,
Initech Policies
Initech IT Department Policies
Initech Human Resources Department Policies