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

查看:28
本文介绍了如何将 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 存储库中,所有内容都在根目录中,因此会使我的主项目变得混乱.

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 目录的子目录中.

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

在主存储库的根目录中,将 wiki 存储库作为子模块添加到 wiki/目录中.

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

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

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