GitHub

Lazygit: A Visible Git Workflow

Choose precise changes, visible transitions, and informed recovery

9 chapters93 min total
Keywords
LazygitGitStagingPatchesRebaseBranchesWorktreesConflictsReflogCustomization
Overview

This series explains how Lazygit shortens the distance between human intent and Git state without hiding Git's underlying model. It moves from connected repository views to precise patch selection, reviewable history edits, worktrees and stacked branches, conflict diagnosis, reflog-bounded recovery, and transparent customization. The organizing loop is to observe state, select the smallest meaningful change, apply it through Git or an explicit external tool, and inspect the refreshed result. Lazygit improves reachability and feedback, but does not prove semantic correctness, make remote changes reversible, or remove the need for judgment when history, collaboration, or external execution is involved.

Learning outcomes
  • Lazygit connects repository state, selection, Git transitions, and refreshed feedback without replacing Git's model.
  • Partial staging is precise only when the selected patch is checked against the staged and unstaged views.
  • Fixups, amends, squashes, worktrees, and stacks serve different history or topology intentions.
  • Conflicts, undo, remotes, and custom commands retain boundaries that require inspection and human judgment.
Keywords
LazygitGitStagingPatchesRebaseBranchesWorktreesConflictsReflogCustomization

Chapters

Preview every chapter · Unlock full text, audio, and video from chapter 4

Plans
Ch.1-3 FreeCh.4-9 Premium

FAQ

What does Lazygit add to Git?

Lazygit adds a visible terminal interface around Git's state and commands, not a separate version-control system. It connects selections, Git-native actions, and refreshed views while leaving semantic judgment to the user.

How does Lazygit support partial staging?

Lazygit lets users select lines, contiguous ranges, or hunks and transforms that choice into a Git-compatible patch. The staged and unstaged views show what crossed into the index and what remained behind.

When should history be rewritten in Lazygit?

Rewrite history when the relationship between a change and its commit should be improved, especially for private work or a reviewable fixup flow. Shared or published rewrites require coordination because commit identities change.

Can Lazygit undo every Git action?

No. Lazygit interprets supported reference movements in the reflog, but its guided undo does not cover working-tree or stash changes, remote pushes, branch creation, or an in-progress rebase.