BitBucket:如何在维库回购中追踪回购的分行? [英] BitBucket: how to track a repo's branches in its Wiki repo?
问题描述
我在BitBucket上有一个(Mercurial)回购站,我有一个文档目录来保存一些简单的降价文件
project
.hg
.hgignore
src
许多文件
doc
Home.md
这个设置允许我与我的代码同步开发我的文档。我可以在功能分支上编写一个记录新功能的小页面,然后使用一次提交将源代码和文档合并到主分支中。然而,BitBucket wiki本身就是一个单独的存储库(我相信它对GitHub也是一样)。我无法弄清楚如何将它指向我的文档。将 doc
重命名为 wiki
并将其作为项目
,但它会丢失主回购的分支。
所以我的问题是:有没有办法可以让我的 wiki
跟踪我的主存储库中的 doc
子目录(及其所有分支)? Git或GitHub使它更容易吗?
似乎没有办法跟踪项目目录中的wiki目录。但是您可以链接到wiki的项目存储库中的文件。示例:
[默认自述文件](https://bitbucket.org/owner/repository/src/tip/README。 md)
[来自feat-aa的README](https://bitbucket.org/owner/repository/src/aa/README.md)
[某些其他文件](https:// bitbucket。 org / owner / repository / src / tip / doc / SOMEFILE.md)
你甚至可以嵌入图片在使用![]()
语法时,将raw放入网址中,并保存在存储库中:
![A image](https://bitbucket.org/owner/repository/raw/tip/image.png)
如果您使用克里奥尔语法而不是降价,甚至有一个更简单的方法。
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?
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.
这篇关于BitBucket:如何在维库回购中追踪回购的分行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!