How to install and use lazygit: stage, commit, and push in the TUI

Install lazygit, open it in a repo, Space to stage, c to commit, P to push to origin.

A long chain of git add, git commit, and git push is easy to mistype. lazygit is Jesse Duffield’s terminal Git UI: run lazygit inside a repo and stage, commit, and push from the keyboard.

Follow the install notes on github.com/jesseduffield/lazygit and install and use lazygit: open a repository, Space to stage, c to commit, P to push. A developer-tools tutorial, not a brainstorm product guide.

InstallOpen a repoStage / commit / push

Install Git first, then the TUI

lazygit shells out to your local git; it does not replace Git. Homebrew is common on macOS. Linux: distro packages or GitHub Releases. Windows: Scoop, Chocolatey, or WinGet. The canonical list is the Installation section of the README.

TUI
Terminal UI
Space
Stage this file
c / P
Commit / push
MethodYou needBest when
HomebrewmacOS / LinuxbrewOne brew install lazygit
Distro / ReleasesLinuxRepo package is stale; grab the binary
Scoop / Choco / WinGetWindowsYou do not want to unzip by hand

Five steps to the first push

  1. 1

    Install lazygit

    On macOS: brew install lazygit. Check lazygit --version. Treat the README as source of truth if package names move.

  2. 2

    Launch inside a Git repo

    cd into a directory that already has git init or a clone, then run lazygit. Outside a repo it errors. Pushing needs a configured origin.

  3. 3

    Stage from the Files panel

    Focus starts on Files. Arrow to a file, Space toggles staged; a stages all (confirm with ?). The left column shows staged vs unstaged.

  4. 4

    Press c for the commit message

    After staging, c opens the commit prompt. Use capital C to open GIT_EDITOR. An empty index is rejected.

  5. 5

    Press P to push

    Capital P pushes the current branch. The first time may ask for upstream. Credentials are Git’s: SSH keys, gh auth, or a credential helper — lazygit does not invent a second login.

brew install lazygit
# Ubuntu/Debian (see GitHub Releases if the repo package is old):
# sudo apt install lazygit

cd /path/to/your/repo
lazygit
# Space = stage  ·  c = commit  ·  P = push  ·  ? = keys

Three panes to learn first

01

Files and the diff

Select a file to see the diff. Enter opens hunks so you can stage a chunk, not the whole file.

02

Branches and Commits

The Branches panel checks out or creates branches. Commits can amend the last message or cherry-pick. Destructive actions ask first.

03

Config file

Path is in the README (often ~/.config/lazygit/config.yml). Finish one push with defaults before theming or custom commands.

Common pitfalls

Won’t start: you are not in a repo, or git is missing from PATH. Push rejected: no origin, no upstream, or stale SSH/HTTPS credentials. Keys feel wrong: the terminal ate Ctrl chords, or you customized config — press ?.

When the push is done and you need a shared sketch, wbstorm is a room ID — see create or join a room and whiteboard basics. Editor rules: how to write Cursor Rules.

Do I have to use Homebrew?

No. The README lists package managers, Go install, and binaries. Use whatever your machine already has.

Does lazygit replace Git?

No. It is a TUI that runs git. Repos, hooks, and credentials stay on Git’s side.

How is this different from GitHub Desktop?

Desktop is a GUI. lazygit stays in the terminal — useful over SSH and next to a split editor. It is not a web PR reviewer.

Is this a wbstorm feature?

No. This article is only lazygit install and a TUI commit/push. wbstorm is a browser brainstorm room and is unrelated to Git clients.

Create room