Skip to content

Example links from GitHub wiki to repo

Andy Glew edited this page Aug 5, 2021 · 9 revisions

I frequently want to link a GitHub repo to its associated wiki, and vice versa.

This is a Markdown wiki page. The GitHub wiki reports other formats.


Links from wiki to wiki

Links from wiki to repo

The next stuff, linking from repo to wiki, will not work in this page within the wiki.

[Link from repo README.md to itself --> README.md](README.md)

[Link from repo to wiki: ../../wiki](../../wiki)

  • ../.. to get out of blob/master to the repo URL base, then add /wiki/

GitHub wiki URLs look like

  • repo base URL
  • /wiki/
  • page name - with weaker than usual transformations :-(

GitHub repo URLs look like

  • repo base URL
  • /blob/master/
  • pathname within repo

To get from wiki to repo,

  • ../ <-- to get to repo base URL, out of /wiki/
  • /blob/master/ <-- or other repo branch
  • pathname

To get from repo to wiki

  • ../../ <-- Get to repo base URL, out of /blob/master/
  • /wiki/
  • wiki page name

"master" is the fairly standard Git name of the main branch.

"blob" is a git concept

but AFAICT it is GitHub convention to form a URL for an item within the repo from the concatenation of

  • repo base URL
  • "blob"
  • branch name "master"
  • and the item pathname relative to the base of the repo

Q: can GitHub URL be formed in other ways, eg with something other than "blob/branchname" ?


The code repo has URL syntax to indicate different branches, and versions within a branch.

The wiki URL has similar syntax, but reversed, for commits(versions)

but AFAIK has no such syntax for branches within the git repository that tracks the wiki itself


Clone this wiki locally