1

I'm currently working on a project with a few people and I was wondering what could be the best way to share the documentation of our project. I was thinking about adding the doc in some folders and adding it in git but I don't really know how to do this the proper way...

We try to follow this how-to for our git repo : http://nvie.com/posts/a-successful-git-branching-model/

I think it's a pretty common way to manage a git repo : master for the releases, develop for the coming features, one branch per feature... but I don't see any way to include and work on the doc with this model. Should I create a specific branch for the doc ? Should I push it in develop then merge it back every time in the feature branches ? I'm a bit lost...

Thanks for your help :-)

4

1 回答 1

0

您可能希望功能的文档与功能本身同时合并。对我来说,这表明您应该在您正在编辑代码的任何分支中处理文档。

因此,我建议有一个 docs 目录(如您在问题中所述),并在您的功能分支中更新它。这样,如果您决定不合并该功能,那么您就不会意外地合并随附的文档。

在开发分支中这样做没有多大意义,因为它是一个集成分支。所以你希望在那里合并东西,但不在那里进行实际开发(包括编写文档)。

我应该为文档创建一个特定的分支吗?

如果您的意思是创建一个仅包含文档的分支,那么不,我认为这是一个坏主意。能够同时检出代码和文档很有用,如果您需要检出两个分支,那就更难了。

如果您的意思是创建一个特定的分支来处理文档,那么是的,可能。如果您将文档称为功能,那么使用功能分支(或类似的不同名称)可能是有意义的。

于 2012-11-15T17:38:50.790 回答