25

I would like to search for any mentions of a specific keyword on a GitHub wiki.

Is there any way to do this?

Amelio Vazquez-Reina
  • 91,494
  • 132
  • 359
  • 564
  • 5
    GitHub web app use questions are better for http://WebApps.StackExchange.com (but this is too old to migrate) – random Aug 11 '13 at 23:55
  • I found it safer to [clone my private repo](http://stackoverflow.com/questions/15080848/how-do-i-clone-a-github-wiki?rq=1) and use my IDE for searching. – Ricardo Jul 08 '16 at 19:32
  • Since Aug 8 2016, Github provides this feature in its search bar. See screenshot in my answer [here](https://stackoverflow.com/a/50633277/728675) – RayLuo May 31 '18 at 21:50
  • 1
    Since Oct. 2021, GitHub wikis are actually searchable with Google or other search index services! See [my edited answer below](https://stackoverflow.com/a/12542007/6309) – VonC Oct 07 '21 at 06:24
  • Actually, they are *not* searchable yet. But GitHub/Microsoft is actively looking at making them searchable. Again, I have edited [my answer below](https://stackoverflow.com/a/12542007/6309) accordingly with the latest details. – VonC Oct 08 '21 at 13:46

2 Answers2

15

You can install the GitHub Wiki Search user script in your browser.

Matt McClure
  • 16,009
  • 2
  • 28
  • 30
8

March 2023, from issue 4992:

  • https://github-wiki-see.page/ offers a way to index wiki for search, pending GitHub resolution.
  • GitHub wiki pages are now being indexed for wiki with Above 500 stars, with "Editing Restricted to Repository Collaborators" turned on

2012:

I don't know of a native GitHub search which would support that.

I usually use a Google search, like in this example where I search for VREF in the Gitolite documentation pages: https://www.google.com/search?q=vref+site%3Agitolite.com%2Fgitolite%2F

I use the "site:" search selector to limit the search to a particular subdomain (like the wiki) of a web site:

vref site:user.github.io/aRepo/

But that won't work for wiki (still true in Oct. 2021).

I find it easier to do a local search by cloning said wiki:

git clone https://github.com/user/yourRepo.wiki

(Take the name of your repo, and add a ".wiki" to access the git repo associated with said wiki).


Update Oct. 2021: a Google search will still not work for GitHub wiki pages!
See this discussion and github/docs PR 10836

Daniel Adams (Program Manager @microsoft & @github) adds:

We have intentionally excluded Disallow: /*/wiki* from the robots.txt.

However, we have also introduced an x-robots-tag: none in the http response header of Wiki pages.
As a result, Wikis are still not visible to search engine crawlers.

Why have we done this?

Abusive behavior in Wikis had a negative impact on our search engine ranking and therefore we had to exclude Wikis from getting crawled to mitigate the effects.
We are now investigating options how we can open the gates again so that everyone can benefit from the great information documented in Wikis.
At this point, we have not decided on whether or when we will allow Wikis to be crawled again, but we are actively reviewing this and will keep you posted with any updates.


Jan. 2022: github/feedback discussion 4992: "Permit search engines to index Github wikis" suggests:

The current criteria does appear to be "Restrict Editing to Collaborators Only", and some sort of user/organization aggregated star total.

That said, there are odd stragglers left out here and there that don't meet the aggregated star requirement so I don't know what's going on there.
About 1.2k wikis meet this rough criteria out of ~400k.

https://docs.google.com/spreadsheets/d/1_W9s8IhnSoypXjTKYSRBK5CNPTQJfXRl7V_1mY0Xq28/edit#gid=905984022

Awesome! It's a start but hopefully GitHub will expand the list.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • 1
    @ShawnSouth I agree. I have edited the answer to propose an alternative solution to this search issue. – VonC Feb 11 '14 at 07:45
  • (Deleted and re-added b/c I wasn't allowed to edit.) There are a couple of things that are problematic with the original answer: 1) The format subdomain.github.com redirects to subdomain.github.io - which is the Pages hosting - which is not where the repository wiki lives. 2) Google site: searches don't appear to work for subfolders. Ex: github.com/BellevueCollege/BellevueCollege.github.io/wiki – Shawn South Feb 11 '14 at 23:49