BitBucket: how to track a repo's branches in its Wiki repo?

♀尐吖头ヾ 提交于 2019-12-11 06:27:24

问题


I have a (Mercurial) repo on BitBucket where I have a documentation directory to keep some simple markdown files

project
    .hg
    .hgignore
    src
        many files
    doc
        Home.md

This setup allows me to develop my documentation in sync with my code. I can write a small page documentating a new feature on a feature branch, and then merge both the source and the documentation into the master branch with a single commit.

However, the BitBucket wiki is a separate repository by itself (and I believe it's the same for GitHub). I can't figure out how to point it to my documentation. What works is to rename doc to wiki and make it a sub-repo inside project, but then it loses the branches from the main repo.

So my question is: Is there any way I can let my wiki track the doc subdirectory (with all its branches) from my main repository? Does Git or GitHub make it any easier?


回答1:


There does not seem to be a way to track the wiki directory inside the project directory. But you can link to files in the project repository from the wiki. Example:

[README from default](https://bitbucket.org/owner/repository/src/tip/README.md)
[README from feat-aa](https://bitbucket.org/owner/repository/src/aa/README.md)
[Some other file](https://bitbucket.org/owner/repository/src/tip/doc/SOMEFILE.md)

You can even embed pictures hosted in the repository by putting "raw" in the url when using the ![]() syntax:

![A image](https://bitbucket.org/owner/repository/raw/tip/image.png)

If you use the Creole syntax instead of markdown, there is even an easier way.



来源:https://stackoverflow.com/questions/17021163/bitbucket-how-to-track-a-repos-branches-in-its-wiki-repo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!