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.
- Author
- G1Joshi ↗
- Repository
- Agent-Skills ↗
- Licence
- MIT
- Last repository change
- 01.10.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 1
No signals detected. Repository changed on 01.10.2026, without references to retired models or APIs.
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
- When to Use
- Quick Start
- Core Concepts
- Common Patterns
- Best Practices
- Troubleshooting
- References
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
| Repository | Score | Licence |
|---|---|---|
| This page · G1Joshi/Agent-Skills | 100 | MIT |
| TerminalSkills/skills | 100 | Apache-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.