-
Notifications
You must be signed in to change notification settings - Fork 5
appendix ab github desktop
Episode coming soon: GitHub Desktop - a conversational audio overview of this appendix. Listen before reading to preview the concepts, or after to reinforce what you learned.
Who this is for: You want a dedicated graphical Git application — something separate from your code editor, with a clear visual interface for cloning, branching, committing, and managing pull requests. GitHub Desktop is a great fit if you prefer working with a purpose-built Git GUI, or if VS Code's Source Control panel feels too embedded in the editor for your workflow.
GitHub Desktop is free, open source, and made by GitHub. It works on Windows and macOS.
- What GitHub Desktop Does (and Doesn't Do)
- Installing GitHub Desktop
- Signing In and Authentication
- The Interface at a Glance
- Cloning a Repository
- Creating and Switching Branches
- Staging and Committing Changes
- Push and Pull
- Syncing Your Fork
- Resolving Merge Conflicts
- Viewing History
- Cherry-Pick in GitHub Desktop
- Stashing Changes
- Undoing Changes
- Accessibility and Screen Reader Notes
- GitHub Desktop vs VS Code vs Git CLI — When to Use Each
GitHub Desktop covers the everyday Git workflow that most contributors use on most days.
- ✅ Clone repositories from GitHub
- ✅ Create, switch, and delete branches
- ✅ Stage files (and individual lines/hunks within files)
- ✅ Write commit messages and commit
- ✅ Push and pull from GitHub
- ✅ Open pull requests (launches GitHub.com in your browser)
- ✅ Resolve merge conflicts with a visual editor
- ✅ View commit history and diffs
- ✅ Cherry-pick commits between branches
- ✅ Stash and restore uncommitted changes
- ✅ Undo commits and discard changes
- ❌ Interactive rebase (
git rebase -i) - ❌
git bisect - ❌
git clean - ❌ Creating annotated tags
- ❌ Commit signing (GPG/SSH)
For these operations, open the repository in your terminal directly from GitHub Desktop — Repository → Open in Terminal or Repository → Open in Command Prompt puts you in the right directory instantly.
Option A: Winget (recommended)
winget install GitHub.GitHubDesktopOption B: Direct download
- Go to desktop.github.com
- Select "Download for Windows"
- Run the installer — it installs and launches automatically
Option A: Homebrew
brew install --cask githubOption B: Direct download
- Go to desktop.github.com
- Select "Download for macOS"
- Open the downloaded
.zip, drag GitHub Desktop to your Applications folder
Linux: GitHub Desktop does not officially support Linux. Linux users should use VS Code's Source Control panel or the Git CLI.
GitHub Desktop uses browser-based OAuth sign-in — no tokens or SSH keys needed. It handles authentication for you automatically.
- Open GitHub Desktop
- Select "Sign in to GitHub.com"
- Your browser opens to a GitHub authorization page — sign in with your GitHub account
- Authorize GitHub Desktop when prompted
- Switch back to GitHub Desktop — you're signed in
That's it. GitHub Desktop stores your credentials securely in the system keychain. You won't be asked for a password again.
If you use GitHub Enterprise or a GitHub organization: Select "Sign in to GitHub Enterprise Server" and enter your organization's server URL.
GitHub Desktop has three main areas:
┌─────────────────────────────────────────────────────────┐
│ Toolbar: Current Repository ▾ | Current Branch ▾ | │
│ Fetch/Push button │
├─────────────────┬───────────────────────────────────────┤
│ │ │
│ Left panel: │ Main area: │
│ Changes tab │ File diff view │
│ (staged / │ (what changed in the selected file) │
│ unstaged) │ │
│ │ │
│ OR │ │
│ │ │
│ History tab │ Commit detail / diff │
│ (past commits) │ │
│ │ │
├─────────────────┴───────────────────────────────────────┤
│ Commit area: Summary field | Description | Commit button │
└─────────────────────────────────────────────────────────┘
| Element | What it does |
|---|---|
| Current Repository (top left) | Switch between your cloned repos |
| Current Branch (top middle) | Switch branches, create new branches |
| Fetch/Push button (top right) | Sync with GitHub (fetch, push, pull) |
| Changes tab | Shows your uncommitted changes |
| History tab | Shows your commit history |
| Summary field (bottom left) | Where you type your commit message |
| Commit button (bottom left) | Commits staged changes |
The easiest way is to go to the repository on GitHub.com and use the Code button:
- On the repository page, activate Code → Open with GitHub Desktop
- GitHub Desktop opens with a dialog confirming the URL
- Choose where to save the repository on your computer
- Select "Clone"
- Press
Ctrl+Shift+O(Windows) orCmd+Shift+O(macOS) — "Clone a repository" - Choose the GitHub.com tab to browse your own repositories, or the URL tab to paste any repo URL
- Select or type the repository
- Choose a local path
- Select "Clone"
gh repo clone owner/repo-name
# Then open it in GitHub Desktop:
github /path/to/repo- Click Current Branch in the toolbar (or press
Ctrl+Shift+N/Cmd+Shift+N) - Type a name for your new branch
- Select "Create Branch"
- Choose whether to base it on the current branch or another — usually keep the default
GitHub Desktop switches to the new branch immediately.
- Click Current Branch in the toolbar
- Type to search or scroll through the branch list
- Click the branch name — GitHub Desktop switches and updates your files
- Click Current Branch in the toolbar
- Right-click the branch you want to delete
- Select "Delete..."
Screen reader tip: The branch selector is a dropdown that opens a searchable list. Screen readers announce the currently selected branch name in the toolbar. After switching, the branch name in the toolbar updates to confirm the switch.
When you edit files in your editor and save them, GitHub Desktop automatically detects the changes and shows them in the Changes tab on the left.
- The left panel lists every changed file with a checkbox
- The right panel shows the diff for the selected file — red lines removed, green lines added
Every file with a checked checkbox will be included in your next commit.
- Check all — click the checkbox at the top of the list to stage everything
- Uncheck a file to exclude it from the commit (it stays as an uncommitted change)
If a file has multiple changes and you only want to commit some of them:
- Select the file in the Changes list
- In the diff view, right-click a line or block
- Select "Stage Line" or "Stage Hunk" — only those lines get included in the commit
- In the Summary field at the bottom, type a short commit message (under 72 characters is ideal)
- Optionally add a longer description in the Description field below it
- Select "Commit to [branch name]" — your changes are committed locally
GitHub Copilot can help: Not sure what to write? Open VS Code alongside GitHub Desktop, open Copilot Chat, and ask: "Write a commit message for these changes: [describe what you changed]." Or use the conventional commit format:
feat:,fix:,docs:,refactor:.
Screen reader tip (Windows, NVDA/JAWS): The Summary and Description fields are standard text inputs — navigate to them with
Taband type normally. The commit button is announced as a button labelled "Commit to [branch name]."
After committing, your changes are saved locally but not yet on GitHub. The Fetch/Push button in the top-right toolbar handles syncing.
After committing, the button changes to "Push origin" with an upward arrow and the number of commits waiting.
- Click "Push origin" — your commits go to GitHub
When collaborators have pushed new commits, the button shows "Pull origin" with a downward arrow.
- Click "Pull origin" — GitHub Desktop downloads the new commits and updates your local branch
- Click "Fetch origin" — GitHub Desktop checks for new commits and shows you the count, but doesn't update your files yet
- This is safe to do at any time — it's read-only
| Action | Windows | macOS |
|---|---|---|
| Push / Pull / Fetch | Ctrl+P |
Cmd+P |
If you forked a repository and the original upstream repo has new commits you want to bring in:
- Go to Branch → Merge into current branch...
- In the branch picker, switch to the "Other branches" tab
- Select
upstream/main(orupstream/master) — the upstream remote's default branch - Select "Create a merge commit"
- Then push to your fork with "Push origin"
GitHub Desktop adds the upstream remote automatically when you clone a fork from GitHub.com. If it's missing:
- Open the repository in terminal: Repository → Open in Terminal
- Run:
git remote add upstream https://github.com/ORIGINAL-OWNER/ORIGINAL-REPO.git
git fetch upstream- Switch back to GitHub Desktop — it will now see the upstream branches
When you pull from GitHub or merge a branch and there are conflicts, GitHub Desktop shows a dialog listing the conflicting files.
-
GitHub Desktop shows a "Resolve conflicts before merging" screen
-
Each conflicting file has two options next to it:
- "Open in [your editor]" — opens the file with conflict markers for manual editing
- "Use mine" / "Use theirs" — accept one entire side of the conflict without editing
-
For simple conflicts (one side is clearly right), use "Use mine" or "Use theirs"
-
For conflicts where you need to keep parts of both, select "Open in [editor]" and resolve manually
- Save the file
- Switch back to GitHub Desktop — the file moves from "Conflicting" to "Resolved"
- Once all conflicts are resolved, select "Continue merge"
GitHub Copilot can help: Open the conflicting file in VS Code alongside GitHub Desktop. Place your cursor inside a conflict region and open Copilot Chat (
Ctrl+Shift+I): "Resolve this merge conflict — keep meaningful changes from both sides." Copilot suggests a resolution; you review and save.
Screen reader tip: The conflicts dialog lists files as a navigable list. Each file entry includes the action buttons ("Open in editor", "Use mine", "Use theirs"). Navigate with
Tabbetween the file entries and buttons.
The History tab (next to the Changes tab in the left panel) shows every commit on the current branch.
- Click the History tab
- Each commit appears as a row: author avatar, commit message, author name, and timestamp
- Click any commit to see the full diff on the right — what changed in each file
Type in the search field above the commit list to filter by commit message, author, or SHA.
- Right-click any file in your project (via the Files panel in the diff area)
- Select "Show in History" — the commit list filters to only commits that touched that file
- Click History
- In the branch comparison bar above the commit list, switch to another branch
- GitHub Desktop shows the commits that are different between your current branch and the selected branch
Cherry-pick lets you take a commit from another branch and apply it to your current branch — without merging the whole branch.
- Switch to the branch you want to copy the commit FROM (the source branch)
- Open the History tab
- Find the commit you want to copy
- Right-click the commit
- Select "Cherry-pick commit..."
- Choose the destination branch — the branch you want to apply the commit TO
- GitHub Desktop applies the commit and switches to the destination branch
GitHub Desktop shows the conflict resolution screen (same as merging). Resolve the conflicts in your editor, then switch back to GitHub Desktop to continue.
GitHub Copilot can help: Before cherry-picking, open Copilot Chat and paste the commit diff: "What does this commit do? Is it safe to cherry-pick onto a branch that doesn't have the surrounding context?"
Stash saves your uncommitted changes temporarily so you can switch branches or pull without committing half-finished work.
- Go to Branch → Stash All Changes (or press
Ctrl+Shift+H/Cmd+Shift+H) - Your working directory reverts to the last commit
- You can now switch branches safely
- Switch back to the branch where you stashed
- Go to Branch → Pop Stash
- Your changes come back
Note: GitHub Desktop supports one stash at a time per branch. For multiple stashes, use the Git CLI:
git stash list,git stash apply stash@{1}. See Chapter 11, Section 10 for the full stash guide.
Go to Edit → Undo Last Commit (or press Ctrl+Z / Cmd+Z right after committing)
This is equivalent to git reset --soft HEAD~1 — your changes come back as staged files. Nothing is lost.
In the Changes tab:
- Right-click a file
- Select "Discard Changes..."
- Confirm the dialog — the file reverts to its last committed state
Warning: Discarding changes cannot be undone. The changes are permanently deleted, not moved to trash.
- Right-click anywhere in the Changes list
- Select "Discard All Changes..."
- Confirm — everything in your working directory reverts to the last commit
GitHub Desktop has partial screen reader support. Core workflows work well with keyboard navigation; some visual-only elements (like avatar images and some icons) don't have text equivalents.
| Feature | Accessibility notes |
|---|---|
| Commit message fields | Standard text inputs, fully accessible |
| Branch selector | Searchable dropdown, keyboard navigable |
| File list (Changes/History) | Arrow keys to navigate, checkboxes announceable |
| Commit button | Labelled with branch name, activatable with Enter
|
| Conflict resolution dialog | Buttons ("Use mine", "Use theirs") are labelled |
| Keyboard shortcut access | Most operations have keyboard shortcuts |
| Feature | Limitation |
|---|---|
| Diff view | The colored diff panel is partially accessible; individual lines may not be announced clearly on all platforms. Workaround: Open in VS Code for better diff navigation |
| File icons | Status icons (M for modified, A for added, D for deleted) may not always be announced — the filename is still readable |
| Context menus | Right-click context menus work via keyboard (Shift+F10 on Windows; Ctrl+Click on macOS) |
- Use
Tabto move between panels; arrow keys within lists - The commit summary field is reached with
Tabafter the file list - Conflict dialogs are modal — screen reader focus moves into the dialog automatically
- Use
TabandVO+Arrowto navigate panels - The diff view can be explored with
VO+Rightthrough the lines - Branch selector opens a searchable popup — type to filter,
Down Arrowto navigate,Returnto select
If screen reader navigation in GitHub Desktop is frustrating for a specific operation, VS Code's Source Control panel is often more accessible. The two tools complement each other — use whichever works best for the task at hand.
| Situation | Best tool |
|---|---|
| You want a clean visual overview of changes before committing | GitHub Desktop |
| You want to stage individual lines or hunks | GitHub Desktop or VS Code |
| You're doing complex operations (rebase, bisect, clean) | Git CLI (terminal) |
| You want the fastest screen-reader-friendly experience | Git CLI or VS Code terminal |
| You want to open a PR or manage issues without leaving your tool | VS Code (GitHub Pull Requests extension) |
| You want to manage multiple repos at once with a visual switcher | GitHub Desktop |
| You're doing quick commits mid-coding session | VS Code (Source Control panel — already open) |
GitHub Desktop, VS Code, and the Git CLI all talk to the same Git repository. You can switch between them freely — use GitHub Desktop to stage and commit, then open the terminal for a git rebase -i. They don't conflict.
Related chapters and appendices: Chapter 11: Git & Source Control in VS Code · Appendix AA: Advanced Git Operations · Appendix D: Git Authentication · Chapter 12: GitHub Pull Requests Extension
- 00 · Pre-Workshop Setup
- 01 · GitHub Web Structure
- 02 · Navigating Repositories
- 03 · The Learning Room
- 04 · Working with Issues
- 05 · Pull Requests
- 06 · Merge Conflicts
- 07 · Culture and Etiquette
- 08 · Labels, Milestones, Projects
- 09 · Notifications
- 10 · VS Code Accessibility
- 11 · Git & Source Control
- 12 · GitHub PRs Extension
- 13 · GitHub Copilot
- 14 · Accessible Code Review
- 15 · Issue Templates
- 16 · Accessibility Agents
- D · Git Authentication
- AA · Advanced Git Operations
- AB · GitHub Desktop
- AC · GitHub CLI
- AD · Git Security
- C · Accessibility Standards
- E · Markdown (GFM)
- F · GitHub Gists
- G · GitHub Discussions
- H · Releases, Tags & Insights
- I · GitHub Projects
- J · Advanced Search
- K · Branch Protection
- L · Security Features
- M · VS Code Accessibility Ref
- N · GitHub Codespaces
- V · Accessibility Agents Ref
- W · Copilot Reference
- X · Copilot AI Models