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.
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.
| Method | You need | Best when |
|---|---|---|
| Homebrew | macOS / Linuxbrew | One brew install lazygit |
| Distro / Releases | Linux | Repo package is stale; grab the binary |
| Scoop / Choco / WinGet | Windows | You do not want to unzip by hand |
Five steps to the first push
- 1
Install lazygit
On macOS:
brew install lazygit. Checklazygit --version. Treat the README as source of truth if package names move. - 2
Launch inside a Git repo
cdinto a directory that already hasgit initor a clone, then runlazygit. Outside a repo it errors. Pushing needs a configuredorigin. - 3
Stage from the Files panel
Focus starts on Files. Arrow to a file,
Spacetoggles staged;astages all (confirm with?). The left column shows staged vs unstaged. - 4
Press c for the commit message
After staging,
copens the commit prompt. Use capitalCto openGIT_EDITOR. An empty index is rejected. - 5
Press P to push
Capital
Ppushes 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 · ? = keysThree panes to learn first
Files and the diff
Select a file to see the diff. Enter opens hunks so you can stage a chunk, not the whole file.
Branches and Commits
The Branches panel checks out or creates branches. Commits can amend the last message or cherry-pick. Destructive actions ask first.
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.