4.4. Gists, Wikis, and GitHub Pages
Not every piece of content belongs inside a repository's main codebase, and GitHub offers three different tools for content that lives alongside it instead.
💡 First Principle: Gists, Wikis, and GitHub Pages all publish content around a repository rather than inside its tracked source, but each targets a different audience and format. A Gist is a shareable, individually version-controlled snippet — useful for a quick code sample with no repository overhead. A Wiki is a collaborative, versioned documentation space attached to one specific repository. GitHub Pages compiles repository content into a live, public static website.
| Gist | Wiki | GitHub Pages | |
|---|---|---|---|
| Best for | A quick, shareable snippet | Internal/reference docs for one repo | A public-facing website |
| Attached to a repo? | No — standalone | Yes, one specific repository | Yes, built from repo content |
| Output | A single snippet page | A set of wiki articles | A rendered website (HTML) |
| Version controlled? | Yes (its own Git history) | Yes | Yes (via the source branch) |
⚠️ Exam Trap: A Wiki and GitHub Pages are not interchangeable just because both turn repository content into web pages — a Wiki is for collaborative internal/reference documentation, while Pages is for publishing a public-facing site.
Reflection Question: A team wants a small internal FAQ that only contributors to one specific repository will read and edit, with no need for custom page design. Which of the three tools fits best, and why would the other two be overkill?