So I have a Github project with a wiki I use to maintain the documentation. Every time something changes in the project or gets added to it, which is bloody often, I document it in the wiki immediately, which helps keep everything documented.
At the same time, most users only get and use periodic binary updates, and therefore need access to the state of the wiki at specific points in time. I know the wiki is a git repository as well, but it is apparently completely separate from the main project repository.
I also know it is possible to integrate the wiki repository as a submodule (though I can't say I understand how those work, as I don't really have commandline git experience) but that by itself does not answer my question, which I formulate this way:
What do I have to do to produce an URL I could just post for the users to direct them to a working wiki, reflecting it's state at the moment of the latest binary release?
It actually could answer the question, since a submodule will record the exact SHA1 of the wiki (registered as a submodule)
Each time you modify your project, you can:
When your users get that repo, a simple
git ls-tree master:<path-to-directory-containing-submodule>
can give them the SHA1 of that wiki.Note that the content of that wiki wouldn't be visible unless those users were to make a:
But if that want only the SHA1, in order to access the wiki at
https://github.com/you/proj.wiki/commit/<SHA1>
,git ls-tree
is enough (they don't need to populate the submodule with any content).Now, if the submodule approach seems too cumbersome, you could more simply setup a pre-commit hook in your local repo, which would:
https://github.com/you/proj.wiki/commit/<SHA1>
)That way, your user would consult that file in order to get the wiki at the right version.