Skip to content
Skills Library
Programming · Tool integration

lazygit

/lazygit

Expert Lazygit terminal UI assistance covering git staging, interactive rebasing, branch management, cherry-picking, and diff inspection. Use when managing Git repositories with keyboard speed.

Licence
MIT
Last repository change
01.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
1
Deprecation

No signals detected. Repository changed on 01.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Expert Lazygit terminal UI assistance covering git staging, interactive rebasing, branch management, cherry-picking, and diff inspection. Use when managing Git repositories with keyboard speed.

Original author description

Expert Lazygit terminal UI assistance covering git staging, interactive rebasing, branch management, cherry-picking, and diff inspection. Use when managing Git repositories with keyboard speed.

How it works

  1. When to Use
  2. Quick Start
  3. Core Concepts
  4. Common Patterns
  5. Best Practices
  6. Troubleshooting
  7. References
Original SKILL.md headings · 128 lines, 623 words
SKILL.md preview
---
name: lazygit
description: Expert Lazygit terminal UI assistance covering git staging, interactive rebasing, branch management, cherry-picking, and diff inspection. Use when managing Git repositories with keyboard speed.
---

# Lazygit

Lazygit is a TUI for Git. It makes complex operations (interactive rebase, partial staging) accessible via intuitive keyboard shortcuts.

## When to Use

- **Interactive Terminal Git UI**: Fast, keyboard-centric interface for staging, committing, branching, and rebasing.
- **Interactive Rebase & Cherry-Picking**: Squashing, rewording, dropping, and reordering commits visually.
- **Partial Line-by-Line Staging**: Staging specific lines or code hunks within modified files via keybindings.
- **Git Worktree & Submodule Management**: Switching worktrees and managing submodules without memorizing flags.

## Quick Start

```bash
# Launch lazygit inside any Git repository
lazygit

# Key Navigation:
# 1, 2, 3, 4, 5: Jump between Files, Branches, Commits, Stash panels
# Space: Stage/unstage selected file or hunk
# c: Commit staged changes
# P: Push to upstream
# p: Pull from upstream
# r: Interactive rebase on selected commit
```

## Core Concepts

### Core Keybindings & Panel Navigation

Navigating git repository state with single keystrokes:

- `1` through `5`: Jump between panels (`1`: Status, `2`: Files, `3`: Branches, `4`: Commits, `5`: Stash).
- `Space`: Stage/unstage selected file or line.
- `a`: Stage all modified files.
- `c`: Open commit message prompt.
- `P`: Push to remote branch (`p`: Pull from remote).
- `b`: Create or checkout branch.
- `z`: Undo last Git action (uses Git reflog).

### Interactive Rebase & Commit Squashing

Streamlining commit histories visually:

1. Press `4` to navigate to the **Commits** panel.
2. Highlight the base commit before your branch changes.
3. Press `i` to start an interactive rebase.
4. Highlight commits to modify:
   - `s`: Squash into previous commit.
   - `r`: Reword commit message.
   - `d`: Drop commit entirely.
   - `e`: Edit commit contents.
5. Press `m` to open merge / rebase options.

### Custom Commands Configuration (config.yml)

Adding customized workflows to Lazygit:

```yaml
# ~/.config/lazygit/config.yml
gui:
  theme:
    selectedLineBgColor:
      - reverse
  nerdFontsVersion: "3"

customCommands:
  - key: "P"
    command: "git push --force-with-lease origin {{.SelectedLocalBranch.Name}}"
    context: "localBranches"
    description: "Force push with lease safely"
    prompts:
      - type: "confirm"
        title: "Force Push"
        body: "Are you sure you want to force push with lease?"
```

## Common Patterns

### Custom Lazygit Commands

**Problem**: Need one-key git workflow actions (e.g. git standup, prune remote branches).  
**Solution**: Define custom keybindings in `~/.config/lazygit/config.yml`.

```yaml
# ~/.config/lazygit/config.yml
customCommands:
  - key: "P"
    command: "git remote prune origin"
    context: "remotes"
    loadingText: "Pruning stale branches..."
  - key: "b"
    command: 'git branch --merged | grep -v "\*" | xargs -n 1 git branch -d'
    context: "branches"
    prompts:
      - type: "confirm"
        title: "Delete Merged Branches"
        body: "Are you sure you want to delete all merged local branches?"
```

## Best Practices

**Do**:

- Use `v` in the diff panel to enter line-by-line staging mode for atomic commits.
- Use `git push --force-with-lease` rather than raw `--force` when pushing rebased feature branches.
- Press `z` in Lazygit to safely undo accidental rebases or commits using the reflog.
- Configure Nerd Fonts support in `config.yml` for clean file and branch iconography.

**Don't**:

- Perform interactive rebases on shared public branches (`main`, `production`).
- Stage files without reviewing the visual diff panel on the right.
- Leave abandoned rebases in progress; abort with `m -> Abort rebase`.

## Troubleshooting

| Error                                | Cause                                                         | Solution                                                                                    |
| :----------------------------------- | :------------------------------------------------------------ | :------------------------------------------------------------------------------------------ |
| `lazygit: command not found`         | Binary not installed in system PATH.                          | Install via `brew install lazygit` or Linux package manager.                                |
| `Rebase conflict screen in Lazygit`  | Interactive rebase paused due to merge conflict.              | Resolve conflicting files, stage with `Space`, and press `m` to choose "Continue rebase".   |
| `Cannot push: credentials not found` | Git credential helper not configured in terminal environment. | Configure credential cache: `git config --global credential.helper osxkeychain` (or store). |

## References

- [Lazygit GitHub](https://github.com/jesseduffield/lazygit)

Versions

RepositoryScoreLicence
This page · G1Joshi/Agent-Skills100MIT
TerminalSkills/skills100Apache-2.0

Database snapshot: 13.11.2026 · package version e72033b9f008 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100git
    Expert Git version control assistance covering branching, interactive rebase, cherry-pick, submodules, worktrees, and conflict resolution. Use when managing source code history and collaboration workflows.
  • 100worktree-guide
    Interactive guide for parallel development with Ghostty, git worktrees, and Lazygit. Use when setting up multi-task workflows or learning the worktree system.
  • 100git
    Advanced Git workflows skill. Branching models, merge vs rebase, interactive rebase, git bisect, cherry-pick, worktrees, commit conventions. Triggers on: /godmode:git, "branching strategy", "rebase vs merge", "git bisect", "cherry-pick".
  • 100git-workflow
    Git operations, branching, commits, PRs, and release workflows. Use when the user asks to "commit", "create PR", "branch", "merge", "rebase", "cherry-pick", "tag", or manage git history.
  • 100git
    Use this skill for complex git operations including rebases, merge conflict resolution, cherry-picking, branch management, PR branch upkeep, or repository archaeology. Activates on mentions of git rebase, merge conflict, cherry-pick, git history, branch cleanup, git bisect,…
  • 90git-merge
    Complex git operations — merge conflict resolution, cherry-picks, rebases. Use when merging branches, resolving conflicts, cherry-picking commits, or rebasing.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.