4.4 KiB
4.4 KiB
Git commit form
The commit form sits at the foot of the Git column, edge to edge. It holds the commit message field, the Commit button and the Push button.
Guide index · Related: Git, Notifications, Keyboard shortcuts
At a glance
+-------------------------------------+
| (1) Shift+Enter to commit |
| |
| |
|-------------------------------------|
| (2) Commit ^ | (3)^ |
+-------------------------------------+
- Message field: one line of commit message. The grey hint
Shift+Enter to commitshows while it is empty. - Commit button: amber when there is something staged.
- Push button: a narrow button with an up arrow. It lights up when the branch has commits to push.
Features
Write the message
- Click the field, or press
Cmd+Canywhere outside a terminal with no text selected.Cmd+Calso shows the Git column when it is hidden. - The focused field gets an amber outline.
- A commit message in Helder is always one lowercase line:
- Capitals become lowercase as you type or paste.
- A line break becomes a space. Pressing
Enteron its own does not start a new line.
- This keeps dictated or pasted text as one short subject line.
- The draft stays in the field while you work elsewhere in the window.
Commit
You can commit in three ways:
- Click Commit.
- Press
Shift+Enter(orCmd+Enter, orCtrl+Enter) in the message field. - Press
Cmd+Enteranywhere in the window.
A commit only happens when both are true:
- At least one file is staged.
- The message is not empty (spaces alone do not count).
The Commit button follows the first rule only. It is amber when something is staged and grey and disabled when nothing is. With files staged but an empty message, the button looks ready but a click does nothing. Type a message first.
After a commit
- The message field clears.
- The committed files leave Staged Changes. Unstaged edits stay in Changes.
- A notification says
Committed N files, with the start of your message below it (cut off after 34 characters). - The Push button lights up, because the branch is now ahead of its remote.
When a commit fails
- Your message comes back in the field, so you can fix and retry.
- A notification says
Commit failed, with git's own error text below it. A typical cause is a git hook that rejected the commit.
Push
- Click the Push button right of Commit, or press
Cmd+P. - The button is lit (amber arrow on an amber tint) when there is something to push:
- The branch is ahead of its remote branch, or
- The branch has no remote branch yet.
- It is grey when there is nothing to push. A click still runs the push; git then reports it is up to date.
- Hover the button for a tooltip:
Push 2 commits to remote (⌘P),Push the branch to remote (⌘P), orNothing to push (⌘P).
What happens when you push:
- A notification says
Pushing…. The button dims and ignores clicks until the push ends. - A branch with no remote branch is pushed to
originand set to track it, so the next push needs nothing extra. - Helder never asks for a password. Git must already have access to the remote, for example through an SSH key or a credential helper.
- A push that takes longer than two minutes stops.
- When it ends, a notification says
Pushedwith git's summary line, orPush failedwith git's last error line. - The Git column re-reads git, so the Push button goes back to grey.
Pull, fetch and branch switching are not part of Helder. Use the Command line for those.
Keyboard
| Keys | Action |
|---|---|
Cmd+C |
Focus the message field (no text selected, not in a terminal) |
Shift+Enter |
Commit, while in the message field |
Cmd+Enter |
Commit, from anywhere in the window |
Ctrl+Enter |
Commit, while in the message field |
Cmd+P |
Push the current branch |
Related
- Git: the column that holds this form, and where you stage files.
- Notifications: the messages after a commit or push.
- Status bar: shows the branch you commit and push to.
- Command line: for git commands Helder has no button for.
- Keyboard shortcuts: every shortcut in one list.