Getting Started with lazygit

This guide will get you from zero to productive with lazygit in about 5 minutes.

1. Install lazygit

macOS

brew install lazygit

Windows

# Scoop
scoop install lazygit

# Or Chocolatey
choco install lazygit

Linux

# Arch Linux
sudo pacman -S lazygit

# Fedora
sudo dnf install lazygit

# Go (any distro)
go install github.com/jesseduffield/lazygit@latest

See the Download page for all installation methods.

2. Launch lazygit

Navigate to any git repository and run:

cd your-project
lazygit

3. Understand the interface

lazygit opens with 5 panels:

PanelWhat it shows
Status (top-left)Current branch, recent commits
FilesChanged files — staged and unstaged
BranchesLocal branches, remotes, tags
CommitsCommit history with graph
StashStashed changes

Navigate between panels with Tab / shift+Tab, or press the number keys 15.

4. Basic workflow

Stage files and commit

  1. Go to the Files panel (2)
  2. Press Space on a file to stage it
  3. Press c to commit — type your message and press Enter
  4. Press P (shift+p) to push

Stage individual lines

  1. Select a file in the Files panel and press Enter to open it
  2. Use arrow keys to navigate to a line
  3. Press Space to stage that line
  4. Press v to start a visual selection of multiple lines

Useful keys to know first

KeyAction
?Show all keybindings for the current panel
qQuit
ctrl+zUndo last action
/Filter current panel
pPull
PPush

5. Next steps