Skip to content

Commit de81c25

Browse files
taylorarndtCopilot
andcommitted
Add advanced Git, GitHub Desktop, and Copilot documentation
- Add Appendix AA: Advanced Git Operations (cherry-pick, interactive rebase, reset/revert, tags, detached HEAD, force push, bisect, clean, branch protection, GitHub Copilot tips for git ops) - Add Appendix AB: GitHub Desktop (full guide — install, auth, UI, clone, branch, stage/commit, push/pull, conflicts, cherry-pick, stash, undo, accessibility notes) - Update Chapter 13: Add Copilot Edits, Agent Mode, Next Edit Suggestions, and Copilot on GitHub.com sections (including PR summary sparkle button) - Update course-guide.md: Add Git Reference section with AA and AB Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent be0322b commit de81c25

File tree

4 files changed

+1545
-9
lines changed

4 files changed

+1545
-9
lines changed

docs/13-github-copilot.md

Lines changed: 185 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,14 @@ Throughout this chapter, look for expandable "learning cards" that show how to a
160160
2. [Installing GitHub Copilot](#2-installing-github-copilot)
161161
3. [Inline Suggestions - Ghost Text Completions](#3-inline-suggestions---ghost-text-completions)
162162
4. [GitHub Copilot Chat - Conversational Assistance](#4-github-copilot-chat---conversational-assistance)
163-
5. [Effective Prompting for Documentation Work](#5-effective-prompting-for-documentation-work)
164-
6. [Custom Instructions vs Custom Agents](#6-custom-instructions-vs-custom-agents)
165-
7. [Using Accessible View with Copilot Responses](#7-using-accessible-view-with-copilot-responses)
166-
8. [Keyboard Shortcuts Reference](#8-keyboard-shortcuts-reference)
163+
5. [Copilot Edits — Making Multi-File Changes](#5-copilot-edits--making-multi-file-changes)
164+
6. [Agent Mode — Let Copilot Drive](#6-agent-mode--let-copilot-drive)
165+
7. [Next Edit Suggestions](#7-next-edit-suggestions)
166+
8. [Copilot on GitHub.com](#8-copilot-on-githubcom)
167+
9. [Effective Prompting for Documentation Work](#9-effective-prompting-for-documentation-work)
168+
10. [Custom Instructions vs Custom Agents](#10-custom-instructions-vs-custom-agents)
169+
11. [Using Accessible View with Copilot Responses](#11-using-accessible-view-with-copilot-responses)
170+
12. [Keyboard Shortcuts Reference](#12-keyboard-shortcuts-reference)
167171

168172

169173
## 1. What is GitHub Copilot
@@ -619,7 +623,180 @@ Useful built-in actions include:
619623
> **Screen reader tip:** After pressing `F1` and typing `copilot`, use `Down Arrow` to browse the filtered list. Your screen reader announces each action name. Press `Enter` to run the selected action on your current selection.
620624
621625

622-
## 5. Effective Prompting for Documentation Work
626+
## 5. Copilot Edits — Making Multi-File Changes
627+
628+
Copilot Edits is the **Edit** chat mode. Instead of just answering questions, Copilot proposes actual file changes — shown as a diff — across multiple files at once. You review every change before anything is saved.
629+
630+
**When to use it:**
631+
- Renaming something used across many files
632+
- Updating documentation to match a code change
633+
- Adding the same pattern (e.g., error handling, a header comment) to multiple files
634+
- Refactoring a section while keeping full control of what changes
635+
636+
### How to use Copilot Edits
637+
638+
1. Open Copilot Chat: `Ctrl+Shift+I` (Mac: `Cmd+Shift+I`)
639+
2. At the bottom of the Chat panel, click the **mode dropdown** and select **Edit**
640+
3. Add files to your **working set** — these are the files Copilot is allowed to edit:
641+
- Click **"Add Files..."** above the chat input, or
642+
- Type `#` in the chat input and select a file from the picker, or
643+
- Right-click a file in the Explorer and choose **"Add File to Copilot Edits"**
644+
4. Type your request: *"Update all headings in these files to use sentence case"* or *"Add a screen reader tip callout to each section that has keyboard shortcuts"*
645+
5. Press `Enter` — Copilot shows a diff of proposed changes in each file
646+
6. Review the changes: use **Accept** or **Reject** on individual files, or **Accept All** / **Reject All**
647+
648+
> **Nothing changes until you accept.** Copilot Edits shows you the full diff first. You are always in control.
649+
650+
### Navigating the diff with a screen reader
651+
652+
- Each changed file appears in the Chat panel as a collapsible section — Tab to it, press `Space` to expand
653+
- Press **Accept** or **Reject** buttons (announced with the file name) to decide per file
654+
- To review the changes line by line before deciding: the diff opens in the editor with `+` and `-` lines — navigate with `Arrow` keys in the terminal or diff view
655+
656+
### Working set tips
657+
658+
- Start with a **small working set** (2–3 files) to see how Copilot interprets your request before expanding to the full project
659+
- You can add or remove files from the working set mid-conversation
660+
- Copilot will tell you if it needs a file that isn't in the working set — add it and ask again
661+
662+
---
663+
664+
## 6. Agent Mode — Let Copilot Drive
665+
666+
Agent mode is the most autonomous way to use Copilot. You describe a goal and Copilot figures out what files to open, what changes to make, and what commands to run — asking for your approval when it needs to run something that has side effects.
667+
668+
**When to use it:**
669+
- Scaffolding a new feature from scratch
670+
- Running a complex multi-step task that involves several files and commands
671+
- Tasks where you're not sure which files need to change
672+
673+
> **Agent mode is powerful — and that's worth being thoughtful about.** It can open, read, and edit files across your whole workspace and run terminal commands. Review its actions as it works, especially before approving terminal commands. Start with well-scoped tasks until you're comfortable with how it behaves.
674+
675+
### How to use Agent mode
676+
677+
1. Open Copilot Chat: `Ctrl+Shift+I` (Mac: `Cmd+Shift+I`)
678+
2. Select **Agent** from the mode dropdown at the bottom of the Chat panel
679+
3. Type your goal: *"Add a Table of Contents to every Markdown file in the docs/ folder"* or *"Find all TODO comments in this project and create a GitHub issue for each one"*
680+
4. Copilot begins working — it shows each step it's taking and asks for approval before running terminal commands
681+
5. Watch the progress in the Chat panel; review any proposed changes in the editor
682+
683+
### Approving terminal commands
684+
685+
When Agent mode wants to run a shell command (like `npm run build` or `git commit`), it pauses and shows you the command before running it.
686+
687+
- **Allow** — run this command once
688+
- **Allow Always** — always allow this command type without asking again (use carefully)
689+
- **Cancel** — stop and don't run it
690+
691+
> **Screen reader tip:** When Copilot pauses for approval, focus moves to the approval dialog in the Chat panel. Your screen reader announces the command Copilot wants to run and the approval options. Tab to your choice and press `Enter`.
692+
693+
### Agent vs Edit vs Ask — choosing the right mode
694+
695+
| You want to... | Use |
696+
|----------------|-----|
697+
| Ask a question or get an explanation | **Ask** |
698+
| Make targeted changes to specific files you control | **Edit** |
699+
| Complete a multi-step task and let Copilot navigate the workspace | **Agent** |
700+
| Review and approve a plan before anything changes | **Plan** |
701+
702+
---
703+
704+
## 7. Next Edit Suggestions
705+
706+
Next Edit Suggestions (NES) is a feature where Copilot watches what you're editing and predicts **where you'll need to make your next change** — then offers to make it for you. Unlike regular inline suggestions that complete what you're currently typing, NES looks ahead to related edits elsewhere in the file.
707+
708+
**Example:** You rename a variable on line 12. NES notices it's also used on lines 34 and 67 and offers to update those too — without you navigating there first.
709+
710+
### Turning on Next Edit Suggestions
711+
712+
1. Open Settings: `Ctrl+,` (Mac: `Cmd+,`)
713+
2. Search for `nextEditSuggestions`
714+
3. Enable **"GitHub Copilot: Next Edit Suggestions"**
715+
716+
Or add to your `settings.json`:
717+
718+
```json
719+
"github.copilot.nextEditSuggestions.enabled": true
720+
```
721+
722+
### How it works in practice
723+
724+
- After making an edit, a **tab stop indicator** (an arrow `` symbol) appears at the location of the predicted next edit
725+
- Press `Tab` to jump there and accept the suggestion
726+
- Press `Escape` to dismiss it and continue editing normally
727+
- The indicator is subtle — if you don't see it, your next keystroke will proceed as normal
728+
729+
> **Screen reader tip:** NES is announced as an inline suggestion at the predicted location. With screen reader optimized mode on (`Shift+Alt+F1`), VS Code announces when a next edit suggestion is available. Navigate to it with `Tab` and accept or dismiss as with any inline suggestion.
730+
731+
---
732+
733+
## 8. Copilot on GitHub.com
734+
735+
You don't need VS Code to use Copilot. GitHub.com has Copilot built directly into the website — useful for quick questions, reviewing code in the browser, drafting PR descriptions, and more.
736+
737+
### Opening Copilot Chat on GitHub.com
738+
739+
1. Go to [github.com](https://github.com) — you must be signed in
740+
2. Look for the **Copilot icon** (a circle with dot pattern) in the top navigation bar
741+
3. Click it (or press `?` then select Copilot from the command palette) to open the chat panel
742+
4. Type your question and press `Enter`
743+
744+
Copilot on GitHub.com has context about your repositories, issues, PRs, and code — you can reference them directly.
745+
746+
### What you can ask Copilot on GitHub.com
747+
748+
```
749+
# Ask about a specific repository
750+
"Summarize the recent changes to the accessibility-agents repo"
751+
752+
# Ask about an issue
753+
"What are the open accessibility issues in this repo?"
754+
755+
# Ask about code
756+
"What does the auth module in this project do?"
757+
758+
# General coding questions
759+
"What's the difference between git rebase and git merge?"
760+
```
761+
762+
### Copilot for Pull Request Summaries
763+
764+
When you open a pull request on GitHub.com, Copilot can generate a description for you automatically.
765+
766+
1. Start creating a new pull request: go to your branch and select **"Compare & pull request"**
767+
2. In the PR form, look for the **✨ sparkle / Copilot icon** next to the description field
768+
3. Click it — Copilot reads your commits and diff and writes a draft description
769+
4. Review and edit the draft — it typically includes what changed and why
770+
5. Submit the PR
771+
772+
> **This is a huge time-saver.** Copilot-generated PR descriptions are usually a solid first draft. Always review them to add context a maintainer would need (like *why* you made the choice, not just *what* you changed).
773+
774+
**Screen reader tip:** The Copilot sparkle button is next to the description textarea. It's announced as a button labelled "Copilot" or "Generate with Copilot." After clicking, the description field is populated — read through it with your screen reader before submitting.
775+
776+
### Copilot for Code Review on GitHub.com
777+
778+
Maintainers can use Copilot to review pull requests on GitHub.com. As a contributor, you may see **Copilot-authored review comments** on your PR — they look like regular review comments but are labelled "Copilot".
779+
780+
- Copilot review comments work just like human review comments — respond, resolve, or address them
781+
- They flag things like potential bugs, style inconsistencies, or missing edge cases
782+
- You don't need to accept every suggestion — use your judgment
783+
784+
### Copilot on GitHub.com vs VS Code
785+
786+
| Feature | GitHub.com | VS Code |
787+
|---------|-----------|---------|
788+
| Chat (general questions) |||
789+
| Repository / issue / PR context | ✅ Built-in | ✅ Via `@github` |
790+
| Inline code suggestions |||
791+
| Copilot Edits (multi-file) |||
792+
| Agent mode |||
793+
| PR description generation |||
794+
| Code review comments | ✅ (for maintainers) ||
795+
| No install required || Requires extension |
796+
797+
---
798+
799+
## 9. Effective Prompting for Documentation Work
623800

624801
Copilot works best with clear, specific prompts. The more context you provide, the better the response.
625802

@@ -727,7 +904,7 @@ Format this as a table instead of a bulleted list
727904
Copilot remembers the conversation context - just say what to change.
728905

729906

730-
## 6. Custom Instructions vs Custom Agents
907+
## 10. Custom Instructions vs Custom Agents
731908

732909
Two distinct tools shape how Copilot behaves. Understanding the difference is critical for working with Accessibility Agents (see [Chapter 16: Accessibility Agents](16-accessibility-agents.md)).
733910

@@ -919,7 +1096,7 @@ These resources can help you write better accessibility-focused custom instructi
9191096
- **Markdown Accessibility Review Guidelines** - A practical guide for reviewing Markdown output for accessibility, useful as a reference when writing documentation-focused instructions: [Markdown Accessibility](https://github.com/github/accessibility/blob/main/docs/markdown-accessibility.md)
9201097

9211098

922-
## 7. Using Accessible View with Copilot Responses
1099+
## 11. Using Accessible View with Copilot Responses
9231100

9241101
Copilot Chat responses stream in token by token. This is visually nice but can fragment screen reader announcements. **Accessible View** provides complete, structured access to generated content.
9251102

@@ -993,7 +1170,7 @@ When Copilot suggests code or Markdown:
9931170
**VoiceOver:** Interact with the code block (`VO+Shift+Down`) to read each line with proper structure.
9941171

9951172

996-
## 8. Keyboard Shortcuts Reference
1173+
## 12. Keyboard Shortcuts Reference
9971174

9981175
### Copilot Inline Suggestions
9991176

0 commit comments

Comments
 (0)