Committing Changes
Create commits, view history, and manage repository state.
Keybindings
Commit Input
| Key | Action |
|---|---|
c | Commit |
A | Amend Commit |
ctrl+e | Submit |
esc | Cancel |
tab | Next Field |
shift+tab | Previous Field |
Commit Log & Reset
| Key | Action |
|---|---|
r | Reset Selected Commit |
R | Reset Latest Commit |
enter | View Details |
Workflows
Creating a Commit
- Stage: Ensure you have staged files in the Modified Files panel.
- Trigger: Press
c. - Popup: The Commit Popup appears with two fields:
- Summary: The first line of your commit message.
- Description: Detailed body of the commit message.
- Input:
- Type your summary.
- Press
tabto move to the description (optional).
- Submit: Press
ctrl+e.- Why
ctrl+e?: Sinceenteris used for new lines in the description field,ctrl+eis used to submit the form.
- Why
Amending a Commit
- Trigger: Press
A(shift+a). - Modify: Edit the message or simply submit to include new staged files.
- Submit: Press
ctrl+e.
Viewing Commit History
- Navigation: Press
3to focus the Commit Log. - Graph: The list displays a visual branching graph and commit summaries.
- Details: The Detail Panel (Right) shows full commit info, including:
- Author, Date, Hash
- Full Message
- Stat summary (insertions/deletions)
- Diffs: Complete file changes for that commit.
Resetting Commits
Refine your history using soft, mixed, or hard resets.
Reset Latest Commit
- Trigger: Press
R(shift+r) in the Commit Log. - Select Mode:
- Soft: Keep changes in Staging.
- Mixed: Keep changes in Working Directory (mstaged).
- Hard: Discard all changes.
- Confirm: A prompt ensures you want to proceed.
Reset to Specific Commit
- Select: Highlight a target commit in the log.
- Trigger: Press
r. - Select Mode: Choose between Soft, Mixed, or Hard reset targeting that commit.
- Confirm: Proceed with the reset.