如何将GitHub wiki集成到主项目中 [英] How to integrate a GitHub wiki into the main project

查看:206
本文介绍了如何将GitHub wiki集成到主项目中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望将我的所有源代码和文档保存在一个git存储库中。我已经将github页面集成到了我的主项目中,现在我想对github wiki也这样做。

I want keep all my source code and documentation in one single git repository. I already have the github pages integrated into my main project and now I want to do the same with the github wiki.

我知道github wiki是纯粹的git存储库。我的计划是将wiki添加为我的主要回购的远程,并将所有内容保存在一个地方。然而,在wiki repo中,所有内容都位于根目录中,因此会干扰我的主项目。

I know that github wikis are plain git repositories. My plan is to add the wiki as a remote to my main repo and keep everything in one place. However in the wiki repo everything is in the root directory and thus would clutter my main project.

有没有人尝试过?什么是最好的方式来处理这个问题?

Has anyone tried this before? What is the best way to handle this?

推荐答案

您想将wiki添加为子模块。相同的Wiki git repo作为远程连接,但在其自己的.git dir子目录中。

You want to add the wiki as a submodule. Same Wiki git repo connected as a remote, but within a subdirectory with its own .git dir.

git submodule add git://github.com/you/proj.wiki

在主要repo的根目录下添加wiki repo作为wiki / dir中的子模块。

In the root of your main repo to add the wiki repo as a submodule in the wiki/ dir.

这篇关于如何将GitHub wiki集成到主项目中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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