Files
helder/docs/guide/git-commit-form.md
T

5.8 KiB

Git commit form

The commit form is the block at the top of the Git view, under its top bar. It holds the commit message, the Gen. Commit Message button, the author, and the three commit buttons.

Guide index · Related: Git, Notifications, Keyboard shortcuts

At a glance

+----------------------------------------------------------------------------+
| (1) fix the login form_                                                    |
|----------------------------------------------------------------------------|
| (2) [ * Gen. Commit Message ] (3) Jonathan <jonathan@example.com>          |
| (4) Cmd+Enter commits                                                      |
| (5) [ Add, Stage & Commit ] (6) [ Commit 2 files ] (7) [ Commit and push ] |
+----------------------------------------------------------------------------+
  1. Message field: the commit message. The grey placeholder Commit message shows while it is empty.
  2. Gen. Commit Message button: asks Claude to write the message for your staged changes. See Generate a message.
  3. Author: user.name <user.email> from your git config, read when the view opens. With no email set, only the name shows; with no name, nothing.
  4. Hint: ⌘↵ commits.
  5. Add, Stage & Commit button: stages every change, new files included, then commits. No push.
  6. Commit button: Commit N files, or Nothing staged. Commits without pushing.
  7. Commit and push button: the amber one. Commits, then pushes.

In the app all of row 2 to 7 is one footer line: the Gen. Commit Message button, the author and the hint on the left, the three commit buttons on the right.

Features

Write the message

  • Opening the Git view puts the cursor in the field. Cmd+C with no text selected, outside a terminal, opens the view there too.
  • The field gets an amber line under it while it has the cursor.
  • The field grows with long text and scrolls after about seven lines.
  • A commit message in Helder is always one lowercase line:
    • Capitals become lowercase as you type or paste.
    • A line break becomes a space. Enter does not start a new line, and it does not commit.
  • This keeps dictated or pasted text as one short subject line.
  • The draft stays in the field while the view is closed.

Generate a message

  • Stage the files first. Then click Gen. Commit Message.
  • Helder sends the staged changes to the Claude Code CLI (claude, the same tool the agent terminal runs) and asks for one short sentence, such as Adds a new button on the header to navigate to profile. Two separate changes are joined with -.
  • The answer replaces what is in the field, as one lowercase line, and the cursor goes to the field so you can edit it before you commit. Nothing is committed for you.
  • While Claude writes, the button reads Generating… and further clicks do nothing. It is dimmed when nothing is staged.
  • Only the staged diff is sent. A very large diff is cut after 60 000 characters; the list of changed files is always sent in full.
  • When it fails, your draft stays and a notification says Couldn't generate a commit message, with the reason: claude not found (install the Claude Code CLI), Claude's first error line (for example a sign-in problem), or timed out (after 90 seconds).

Commit

You can commit in two ways:

  • Click Commit N files.
  • Press Cmd+Enter while the view is open. This works from the message field too, but not from the console input.

With nothing staged Commit N files and Commit and push are dimmed and do nothing; Cmd+Enter still runs git commit. With files staged a click always runs git commit, also with an empty message, so git's own refusal shows in the console.

Commit and push

  • Click Commit and push. It is amber when at least one file is staged and the message is not empty, grey otherwise. It commits, and when the commit succeeds it pushes, the same as the Push button. See Pull and push.

Add, Stage & Commit

  • Click Add, Stage & Commit to stage every change and commit it in one go: edited, deleted and new files. It does not push.
  • With an empty message nothing is staged and nothing runs; the cursor goes to the message field.
  • It is dimmed and does nothing when there are no changes, during a merge conflict (resolve it first), or while a push or pull runs.
  • When staging fails, for example because another git process holds the index, nothing is committed. The error is in the console.

After a commit

  • The message field clears.
  • The committed files leave the staged section. Unstaged edits stay where they were.
  • A notification says Committed N files, with the start of your message below it (cut off after 34 characters).
  • Push in the top bar shows ↑N, because the branch is now ahead of its remote.

When a commit fails

  • Your message stays in the field, so you can fix and retry.
  • A notification says Commit failed, with git's first error line below it. The full output is in the console. Typical causes are nothing staged, an empty message, or a git hook that rejected the commit.
  • When the message was empty, the cursor goes back to the field.

Keyboard

Keys Action
Cmd+C Open the Git view on the message field (no text selected, not in a terminal)
Cmd+Enter Commit, while the Git view is open (not from the console input)
Cmd+P Push the current branch