Getting Started with lazygit / Chapter 1 — Getting Started with lazygit (lessons 1–4) / Lesson 1

What lazygit Is — Panels and Tabs

Time needed: about 10 min (estimate)

☆ Read later

You can try the opening of this lesson without an account.

A screen for git inside your terminal

lazygit is a tool for driving git from a screen inside your terminal (a TUI). It's written by jesseduffield, and the official repository is jesseduffield/lazygit. When you press a key, lazygit runs git commands behind the scenes. Those commands show up in the command log at the bottom of the screen (gui.showCommandLog: true), so you can always check what just happened.

Five panels and their tabs

Down the left side of the screen are the side panels. Their order comes from the gui.sidePanels setting, and by default there are five: Status, Files, Branches, Commits, and Stash. A panel with more than one name in it has tabs, which you switch with [ and ]. On the right is the main view, which shows the diff or log for whatever you've selected; press 0 to move there. Below is part of the default config, printed with lazygit --config. Since the number keys 1 to 5 jump straight to a panel, we'll also turn the setting into a Python list and print which key goes to which panel and what other tabs each one holds.

Terminal

$ lazygit --config gui: ... sidePanels: - [status] - [files, worktrees, submodules] - [branches, remotes, tags] - [commits, reflog] - [stash]
editor.py

Tab indents. To leave the editor, press Esc, then Tab.

Create a free account to keep reading

With an account you can read the rest of this lesson, take the quiz, and read every free lesson in this course. Lessons you answer correctly are recorded as complete.

Report a problem with this lesson

Log in to send a report.

Keyboard shortcuts

Keys available in a lesson
KeyAction
[ or Alt + ←Go to the previous lesson
] or Alt + →Go to the next lesson
?Open this list
EscClose this list

The keys do not work while the cursor is in a code editor or an input field.