adds a functional design

This commit is contained in:
2026-10-05 11:10:12 +02:00
parent 201c59c659
commit ed5a227c9d
25 changed files with 2888 additions and 0 deletions
+185
View File
@@ -0,0 +1,185 @@
# Git
The Git column (Source Control) is the leftmost column of the window. It lists every changed file in the project's git repository, lets you stage and unstage them, and holds the commit box at its foot.
[Guide index](index.md) · Related: [Git commit form](git-commit-form.md), [Right-click menu](right-click-menu.md), [Dialogs](dialogs.md), [File view: Diff](file-view-diff.md), [Status bar](status-bar.md)
## At a glance
```text
+-------------------------------------+
| (1) STAGED CHANGES - 2 |
| (2) [] app/Http |
| (3) M [php] UserController.php +4 |
| A [php] Invoice.php +31 |
|-------------------------------------|
| (1) CHANGES + 3 |
| [] . |
| M [md] README.md +2 -1 |
| [] tests/Feature |
| (4) M [php] UserTest.php [ + ] |
| D [php] -OldTest.php- -12 |
| |
|-------------------------------------|
| (5) Shift+Enter to commit |
| |
|-------------------------------------|
| (6) Commit ^ | (7) ^ |
+-------------------------------------+
```
1. **Group header**: `Staged Changes` or `Changes`, with the row count in amber on the right. Hover the header to see its quick action: `-` (Unstage all) or `+` (Stage all).
2. **Folder line**: the folder that the rows below it live in. `.` is the project root.
3. **Row**: status letter, file-type badge, file name, and line counts.
4. **Hover quick action**: a `+` or `-` that replaces the line counts while you hover or select the row.
5. **Commit message**: see [Git commit form](git-commit-form.md).
6. **Commit button**: see [Git commit form](git-commit-form.md).
7. **Push button**: see [Git commit form](git-commit-form.md).
## Features
### Two groups: staged and unstaged
- **Staged Changes** sits on top. It lists what the next commit will hold.
- **Changes** sits below. It lists edits in the working tree that are not staged yet.
- Each group shows its row count on the right of its header.
- Inside a group, rows are grouped by folder. Each folder gets a small folder line with its path. Hover a folder line to see the full path; the project root reads `.`.
- One file can show up twice: once in Staged Changes and once in Changes. That happens when you staged a file and then edited it again. Each row stands for its own half of the change.
There is no column header or title. The column starts with the first group.
### Row anatomy
Every row, left to right:
- **Status letter** (see the table below).
- **File-type badge**, the same badge the [Explorer](explorer.md) uses.
- **File name**. A deleted file has its name struck through and dimmed. Files under `tests/` or `cypress/` show in a dimmer grey, so source files stand out.
- **Line counts** on the far right: `+N` in teal for added lines, `−N` in amber-deep for removed lines. A count of zero is left out.
Hover a row to see its full project-relative path in a tooltip.
### Status letters and colours
| Letter | Meaning | Colour in Staged Changes | Colour in Changes |
|---|---|---|---|
| `A` | Added: a new file, also an untracked one or a copy | teal | amber |
| `M` | Modified; a merge conflict also reads `M` | teal | amber |
| `D` | Deleted | teal | amber-deep |
| `R` | Renamed | teal | light grey |
Staged letters are always teal, whatever the status. Unstaged letters follow the status. A merge conflict shows as one `M` row in Staged Changes, because git cannot stage half of a conflict.
### Open a file from a row
- **Click** a row to open that file in the [File view](file-view.md). It opens on the live file, not the full-screen Diff.
- The row remembers which half you clicked. When the file has rows in both groups, the Diff for that file then compares just that half: `HEAD → staged` for a staged row, `staged → actual` for an unstaged row.
- The row of the open file stays highlighted.
- To go straight into the full-screen Diff, use **Open diff** in the [right-click menu](right-click-menu.md#git-rows).
### Stage and unstage one file
- Hover a row. Its line counts make way for a quick action button:
- `+` on a row in Changes: **Stage changes**.
- `−` on a row in Staged Changes: **Unstage changes**.
- Click the button. The row moves to the other group.
- The same actions sit in the [right-click menu](right-click-menu.md#git-rows).
- By default there is no confirmation. Turn on `git.confirmStage` or `git.confirmUnstage` to get a [confirm dialog](dialogs.md#confirm-dialog) first.
### Stage all and unstage all
- Hover the **Changes** header and click `+` (**Stage all**). Every unstaged file is staged.
- Hover the **Staged Changes** header and click `−` (**Unstage all**). Every staged file goes back to Changes.
- The button only shows while the group has rows.
- Stage all and Unstage all never ask for confirmation.
### Discard changes
- Right-click a row and choose **Discard changes**. See the [right-click menu](right-click-menu.md#git-rows).
- It asks first by default (`git.confirmDiscard`). See [Dialogs](dialogs.md#discard-changes).
- A file that exists in the last commit goes back to that version, in the staging area and on disk. Both its staged and its unstaged changes are gone.
- A file that is not in the last commit (a new file) is unstaged and deleted from disk.
- A staged rename also gets its old file back.
- An open file reloads from disk after a discard.
### Row cursor and keyboard
The column has a keyboard cursor: one highlighted row.
- Click the column, or move focus to it with `Cmd+Left` / `Cmd+Right`, to make it the active column.
- `Up` and `Down` move the cursor through the rows: first all staged rows, then all unstaged rows, folder by folder.
- `Enter` opens the row under the cursor, the same as a click.
- `Cmd+Right` opens the row's [right-click menu](right-click-menu.md#git-rows), beside the column at the row's height.
- Hovering a row with the pointer also moves the cursor to it.
- When the cursor's row disappears, for example after a commit, the next `Up` or `Down` starts again at the top.
### Empty states
- **Not a repository**: the column shows `— Not a git repository.` and nothing else. The commit box stays at the foot.
- **Clean working tree**: the column shows `— No changes. The working tree is clean.`
- **Nothing staged**: under the Staged Changes header, `— Nothing staged.`
- **Everything staged**: under the Changes header, `— All changes are staged.`
### Branch and totals
The column itself shows no branch. The current branch, the line totals of all changes, and the staged and unstaged counts sit on the left of the [Status bar](status-bar.md). The branch cannot be switched from Helder.
### Worktrees
A project folder that is a git worktree (or a submodule) works like a normal repository. Helder finds the real git folder and watches it for changes. There is no worktree list or worktree switcher.
### How the list stays up to date
You do not need to refresh by hand. The list updates by itself:
- **On every change**: Helder watches the project folder and the git folder. Edits by you, by the agent, or by git in a terminal update the list after a short pause.
- **On a timer**: as a backstop, git is re-read every 10 seconds by default (`git.refreshInterval`).
- **When you click into the column**: moving focus into the Git column from another column re-reads git.
- **After every action**: stage, unstage, discard, commit and push all re-read git when they finish.
- **By hand**: `Cmd+R` (View → Refresh) re-reads git, the file tree and the open file. The column flashes briefly to show it.
When a git action fails, a [notification](notifications.md) names the action, for example `Stage failed`, with the file or git's own error line.
### Show or hide the column
- `Cmd+G`, or the **Git** toggle in the [Title bar](title-bar.md), shows or hides the column.
- `Cmd+C` (with no text selected and outside a terminal) shows a hidden column and puts the cursor in the commit message.
- See [Layout](layout.md) for column widths and splitters.
## Keyboard
| Keys | Action |
|---|---|
| `Up` / `Down` | Move the row cursor (Git column active) |
| `Enter` | Open the row under the cursor |
| `Cmd+Right` | Open the right-click menu of the row under the cursor |
| `Cmd+Left` / `Cmd+Right` | Move focus to the column on the left or right |
| `Cmd+C` | Focus the commit message (no text selected, not in a terminal) |
| `Cmd+Enter` | Commit the staged files |
| `Cmd+P` | Push the current branch |
| `Cmd+G` | Show or hide the Git column |
| `Cmd+R` | Re-read git, the file tree and the open file |
## Settings
All settings live in `.helder/config.json`. See [Configuration](configuration.md).
| Setting | Default | Effect |
|---|---|---|
| `git.confirmDiscard` | `true` | Ask before Discard changes |
| `git.confirmStage` | `false` | Ask before staging one file |
| `git.confirmUnstage` | `false` | Ask before unstaging one file |
| `git.refreshInterval` | `10000` | Milliseconds between automatic git re-reads; `0` turns the timer off |
| `git.defaultDiffMode` | `updated` | How a changed file opens; see [File view: Diff](file-view-diff.md) |
## Related
- [Git commit form](git-commit-form.md): the message field, Commit and Push at the foot of this column.
- [Right-click menu](right-click-menu.md#git-rows): every action on a git row.
- [Dialogs](dialogs.md): the confirm dialog for discard, stage and unstage.
- [File view](file-view.md): where a clicked row opens.
- [File view: Diff](file-view-diff.md): the full-screen comparison behind Open diff.
- [Explorer](explorer.md): shows the same status letters in the file tree.
- [Status bar](status-bar.md): branch, line totals and counts.
- [Notifications](notifications.md): the messages after a commit, push or failed action.
- [Keyboard shortcuts](keyboard-shortcuts.md): every shortcut in one list.