Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

gg lint

Run configured lint commands on stack commits.

gg lint [OPTIONS]

Options

  • -u, --until <UNTIL>: Stop at target entry (position, GG-ID, SHA)
  • --json: Emit structured JSON output

Examples

# Lint from bottom to current
gg lint

# Lint only a subset
gg lint --until 2

Mutating --until runs

When lint rewrites commits in sequential mode, --until freezes the originally selected entries before the first rewrite. If a rewrite drops one, an entry that shifts into the same stack position does not replace it.

A stable, unique GG-ID or title lets an originally selected entry continue across OID-changing rewrites. If an earlier rewrite makes a selected commit’s OID unresolvable and it has no unique GG-ID or title, lint fails closed with a validation could not be completed error instead of reporting success.

Inspect the rewritten current stack and rerun gg lint. Before retrying broader mutating validation, make commit identity unambiguous: prefer unique GG-IDs, otherwise use unique titles. Already-applied rewrites remain in place under the existing restoration behavior.

When lint starts from a detached stack position (for example, after gg mv 2), it keeps HEAD detached at that logical position. If lint rewrites the commit, HEAD follows the rewritten entry when its GG-ID identifies it uniquely. If the identity is missing or ambiguous, HEAD returns to the exact original commit instead of attaching to or guessing a stack branch.