User guide / Git

Automatic refresh

Development reference · View source

Filesystem changes to the worktree, index, HEAD, refs, packed refs, stashes, and linked-worktree metadata trigger one debounced background refresh. git.refresh_interval_seconds bounds how often (see Automatic Git refresh ). :git-refresh or Space g r reconciles immediately.

A refresh waits while you work, because it rewrites a Git view’s text and moves the cursor. It is held back:

  • until you pause briefly;
  • while a prompt is open, including s and / queries;
  • while a Git view holds a deliberate selection, such as the matches s leaves.

Nothing is dropped: the refresh runs as soon as you stop, the prompt closes, or the selection collapses. A selection in an ordinary file defers nothing, because a refresh changes its gutter, not its text.

The cursor keeps its place. Its row is matched by identity — the commit, path, branch, or hunk it was on — and falls back to the nearest surviving row. The column is clamped to the end of whatever row it lands on.