# Appendix F: GitHub Gists > > **Listen to Episode 23:** [GitHub Gists](../PODCASTS.md) - a conversational audio overview of this chapter. Listen before reading to preview the concepts, or after to reinforce what you learned. ## Shareable Code Snippets and Notes > Gists are a simple way to share code snippets, notes, or small files without creating a full repository. Think of them as lightweight, version-controlled pastebins. ## What Is a Gist? A Gist is a Git repository that holds a single file or a small collection of files. Every Gist: - Has its own URL (e.g., `gist.github.com/username/a1b2c3d4`) - Is version-controlled (you can see edit history) - Can be **public** (anyone can see) or **secret** (only people with the link can see) - Supports Markdown rendering - Can be embedded in web pages - Can be cloned, forked, and starred just like repos **Secret does not mean private.** Anyone with the URL can view a secret Gist. It's just not listed publicly on your profile. ## When to Use a Gist vs a Repository | Use a Gist When... | Use a Repository When... | | -------------------- | -------------------------- | | Sharing a single code snippet | Building a full project | | Posting configuration examples | Collaborating with multiple people | | Quick notes or documentation | Need issues, PRs, or project management | | Sharing logs or error messages | Want CI/CD and automated checks | | Small utility scripts | Need multiple branches | ## Creating a Gist ### Via GitHub Web Interface 1. Navigate to [gist.github.com](https://gist.github.com) 2. **Gist description:** A short title (e.g., "NVDA configuration for GitHub") 3. **Filename:** Name your file with extension (e.g., `nvda-config.txt`, `script.py`, `notes.md`) 4. **Content:** Paste or type your code/text 5. **Visibility:** - Select **"Create public gist"** for openly shareable content - Select **"Create secret gist"** for link-only sharing 6. The Gist is created with a unique URL you can share #### Screen reader navigation - `D` to cycle landmarks to "Main" - `F` to navigate form fields - Tab through: Description → Filename → Content textbox → Visibility buttons ### Adding Multiple Files to a Gist You can add multiple files to a single Gist: 1. After typing the first filename and content, select **"Add file"** (button below the editor) 2. Repeat for each additional file 3. Create the Gist **Use case:** Share related config files together (e.g., `.vscode/settings.json` + `.vscode/keybindings.json`) ## Editing a Gist 1. Navigate to your Gist's URL 2. Select **"Edit"** (button in the top-right) 3. Make your changes 4. Select **"Update public gist"** or **"Update secret gist"** Every edit creates a new revision. Click **"Revisions"** to see the full edit history. ## Embedding a Gist You can embed Gists in web pages, blog posts, or documentation: ```html ``` GitHub renders it as a formatted code block with syntax highlighting and a link back to the Gist. **Accessibility note:** Embedded Gists are `