adds claude-generated commit messages and a recent commits panel to the git view - adds log tailing in the explorer, branch merging and a clean up button
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Git commit form
|
||||
|
||||
The commit form is the block at the top of the [Git](git.md) view, under its top bar. It holds the commit message, the author, and the Commit split button.
|
||||
The commit form is the block at the top of the [Git](git.md) view, under its top bar. It holds the commit message, the Gen. Commit Message button, the author, and the three commit buttons.
|
||||
|
||||
[Guide index](index.md) · Related: [Git](git.md), [Notifications](notifications.md), [Keyboard shortcuts](keyboard-shortcuts.md)
|
||||
|
||||
@@ -10,21 +10,21 @@ The commit form is the block at the top of the [Git](git.md) view, under its top
|
||||
+----------------------------------------------------------------------------+
|
||||
| (1) fix the login form_ |
|
||||
|----------------------------------------------------------------------------|
|
||||
| (2) Jonathan <jonathan@example.com> (3) Cmd+Enter commits |
|
||||
| (4) [ Commit 2 files | v ] |
|
||||
| (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 ] |
|
||||
+----------------------------------------------------------------------------+
|
||||
(5)
|
||||
+------------------------+
|
||||
| v Commit |
|
||||
| ^ Commit and push |
|
||||
+------------------------+
|
||||
```
|
||||
|
||||
1. **Message field**: the commit message. The grey placeholder `Commit message` shows while it is empty.
|
||||
2. **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.
|
||||
3. **Hint**: `⌘↵ commits`.
|
||||
4. **Commit button**: `Commit N files`, or `Nothing staged`. The caret on its right opens the menu.
|
||||
5. **Commit menu**: **Commit** and **Commit and push**.
|
||||
2. **Gen. Commit Message button**: asks Claude to write the message for your staged changes. See [Generate a message](#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
|
||||
|
||||
@@ -38,17 +38,30 @@ The commit form is the block at the top of the [Git](git.md) view, under its top
|
||||
- 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](notifications.md) 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 three ways:
|
||||
You can commit in two ways:
|
||||
|
||||
- Click **Commit N files**.
|
||||
- Choose **Commit** from the caret menu.
|
||||
- Press `Cmd+Enter` while the view is open. This works from the message field too, but not from the console input.
|
||||
|
||||
The button is amber when at least one file is staged and the message is not empty. Otherwise it is grey. A click always runs `git commit`, also when the button is grey, so git's own refusal shows in the [console](git.md#console).
|
||||
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](git.md#console).
|
||||
|
||||
### Commit and push
|
||||
- Choose **Commit and push** from the caret menu. It commits, and when the commit succeeds it pushes, the same as the **Push** button. See [Pull and push](git.md#pull-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](git.md#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](git.md#console).
|
||||
|
||||
### After a commit
|
||||
- The message field clears.
|
||||
|
||||
Reference in New Issue
Block a user