Skip to content

Working Copy and Staging

Garrett Speager edited this page Oct 8, 2026 · 3 revisions

Working Copy & Staging

The Working Copy tab is where you review and stage changes before committing.

Layout

A file list sits on the left (switch between a flat list or a folder tree, and filter by typing), with the diff for the selected file on the right. Files are grouped into Staged and Unstaged sections; during a merge or rebase, a Conflicted section appears too. A file can appear in both Staged and Unstaged at once if you've staged part of it and kept editing.

Expand diff hides the file list so the diff runs across to the sidebar — handy for long or wide changes. Show file list brings it back.

Staging and unstaging

  • Click a file's checkbox to stage or unstage it.
  • Stage all / Unstage all act on an entire section. This button is intentionally not offered for conflicted files — conflicts need to be resolved, not mass-staged.
  • Select multiple files with Shift-click (everything between two clicks) or Ctrl/Cmd-click (one file at a time), then right-click for a group action: stage, unstage, stash, export as a patch, copy paths, or discard.
  • A selection can span both Staged and Unstaged. Then the group actions are stash, export as a patch, and copy paths; staging, unstaging, and discarding need a selection within one section.
  • With a file open, press Space to toggle staging without touching the mouse.

Right-click actions on a file

Right-click a file, or use its More actions button:

  • Stage / unstage
  • Stash (just this file)
  • Copy path
  • View file history
  • View blame (tracked files only — see Blame & Bisect)
  • Add to .gitignore, or add its extension to .gitignore (untracked files only)
  • Discard changes
  • Open in your configured external diff tool

Staging single lines

To stage only some of a hunk's lines, click their line numbers in the diff, then use the hunk's Stage button. See The Diff Viewer.

Stashing some files

Right-click a file — or a selection of files, across Staged and Unstaged — and choose Stash to shelve just those, leaving everything else as it is. Other staged files stay staged and out of the stash. See Stashes & Tags.

Discarding changes

Discard behaves differently depending on the file's state, to avoid surprises:

  • Untracked files are removed entirely (git clean).
  • Tracked files only drop the unstaged edit — anything already staged is kept.

Discarding is destructive and always asks for confirmation first.

Exporting patches

You can export the whole working tree, or just a selection of files, as a patch file — useful for sharing a change without committing or pushing it.

Staying in sync

The file list refreshes automatically when files change on disk, and there's a manual refresh button if you'd rather control it yourself.

For how the diff itself works, see The Diff Viewer.

Clone this wiki locally