Changes Section

The Changes section is where you inspect what is different in the working copy compared to the last commit, stage or unstage individual files, discard edits you no longer want, and preview the exact diffs before committing. It is the panel's answer to "what did I actually change?".

Committing itself — with a message, checkboxes, and an optional push — happens in the dedicated Commit Mode, covered in the next sub-section. This section documents the browsing, staging, and diff-inspection side only.

Layout

Selecting Changes in the section navigation updates two areas of the panel at once:

  • Left column, inline under the Changes entry: a scrollable, grouped list of every file with a pending change. This is the file picker.
  • Right side: the diff viewer. It is blank with the message "Select a file to view diff" until you click a file, and then fills with the diff of whichever file you selected.

The File List

The file list is split into up to three groups, each with its own header and count. Empty groups are hidden so the list never shows noise you do not need. Files inside each group are grouped by their parent folder for readability:

  • Staged (N): files already placed on the index. These are the ones the next commit will include.
  • Unstaged (N): tracked files whose working copy differs from the last commit but that have not been staged yet.
  • Untracked (N): files present in the folder that Git has never seen before.

Every row in every group shows a one-letter status code on the left (M for modified, A for added, D for deleted, R for renamed, U for untracked, C for conflicted) followed by the file name. Clicking anywhere on a row makes that file the active selection, which immediately updates the diff viewer on the right.

Per-File Actions

Hovering over a row reveals small action buttons aligned to the right. Which buttons appear depends on the group:

  • Staged rows: a single Unstage button (minus icon). Clicking it removes that file from the index without touching its working-copy content; it reappears in the Unstaged group below.
  • Unstaged rows: a Stage button (plus icon) and a Discard button (counter-clockwise arrow). Stage moves the file to the Staged group. Discard is the destructive path — it reverts the file to its last-committed state and is protected by a confirmation dialog (see below).
  • Untracked rows: only a Stage button. Untracked files cannot be discarded from here because Git has nothing to revert them to.

Below the three groups sits a single extra button: + Stage All. It stages every unstaged and untracked file at once — a quick way to bulk-accept everything before moving to Commit Mode.

Discard Confirmation

Because discarding is not reversible, clicking the Discard button does not immediately throw the changes away. It opens a dialog titled Discard Changes? with the message "All uncommitted changes in this file will be lost. This action cannot be undone." and two buttons — Discard to proceed and a Cancel action to back out.

Nothing on disk is touched until you confirm. If you cancel, the file is still selected in the list and the diff viewer still shows its pending changes.

The Diff Viewer

The right side of the Changes section is a full-height diff viewer. At the top there is a thin header showing the file path and a small view-mode switch on the right with two buttons:

  • Side (side-by-side): the default. Two parallel columns labelled Original and Modified, each with its own line-number gutter, the affected hunks, and the hunk headers (for example @@ -40,6 @@ on the left and @@ +40,8 @@ on the right). Deleted lines appear only on the left, added lines only on the right, context lines align in both columns.
  • Uni (unified): a single column with both old and new line numbers, and a + / - /   prefix on each line. More compact when the file has many small edits.

Switching modes is instant and is remembered for the rest of the session — you will not have to toggle it again every time you pick a different file.

Two special cases are handled explicitly:

  • Binary files: the viewer shows "Binary file — cannot display diff" instead of attempting to render the contents. You can still stage, unstage, or discard the file as usual.
  • No effective change: if a file is in the list but has no actual diff (for example, after you unstage something that was whitespace-clean), the viewer shows "No changes".

Live Refresh from the File System

The Changes section reflects the state of the folder in real time. Editing a flow or a spec from Tigrister's main UI adds it to the Unstaged or Untracked list as soon as the file is saved, and removing a file makes it disappear — all without reopening the Git panel or manually refreshing anything. This also means diffs you are looking at stay current: if the file is still being edited elsewhere in the app, the diff viewer will redraw on the next save.