lazygit is a simple terminal UI for git commands that makes git easier to use.
It provides an interactive interface to perform common git operations such as:
Viewing and staging files
Committing changes
Browsing logs and diffs
Managing branches and remotes
Handling stashes
All features of lazygit can be easily accessed using arrow keys and intuitive keystrokes.
Options
Positional Arguments
git-arg
Panel to focus upon opening lazygit. Accepted values (based on git terminology): status, branch, log, stash. Ignored if --filter argument is passed.
Flags
-h, ---help
Displays help with available flags, subcommands, and positional value parameters.
-v, ---version
Print the current version of lazygit.
-p, ---pathpath
Path of the git repository. Equivalent to ---work-tree=path and ---git-dir=path/.git.
-f, ---filterpath
Path to filter on in gitlog--<path>. When in filter mode, the commits, reflog, and stash are filtered based on the given path, and some operations are restricted.
-d, ---debug
Run in debug mode with logging. Use the LOG_LEVEL environment variable to set the log level (debug, info, warn, error).
-l, ---logs
Tail lazygit logs. Intended for use when lazygit--debug is running in another terminal tab.
---profile
Start the profiler and serve it on HTTP port 6060. See /usr/share/doc/lazygit/CONTRIBUTING.md.gz for more details.
-c, ---config
Print the default config.
-cd, ---print-config-dir
Print the path to the configuration directory.
-ucd, ---use-config-dirdir
Override the default configuration directory with the provided directory.
-w, ---work-treepath
Set the Git ---work-tree argument.
-g, ---git-dirpath
Set the Git ---git-dir argument.
-ucf, ---use-config-filefile1,file2,...
Use a comma-separated list of custom config file(s).
-sm, ---screen-modemode
Set the initial screen mode, which determines the size of the focused panel. Valid values are: normal, half, full.
Keybindings
Default keybindings vary by context. For example:
j/k
Move up/down in lists.
h/l
Move between panels (left/right).
1/2/3/4/5
Focus a specific panel.
[/]
Move between tabs within a panel.
s
Stage / unstage a file.
c
Open commit panel.
p
Push to remote.
P
Pull from remote.
/
Search.
PgUp/PgDn
Scroll content (e.g. log or diff views).
Space
Select item or toggle checkbox (e.g. in stash or patch panels).
Enter
Enter panel or confirm action.
Esc
Cancel action or close popup.
q
Quit the application.
To view the full keybindings list, press? in the application.
You can refer to the following files for full keystrokes:
User configuration file. This file defines keybindings, theme settings, git override commands, and more. You can refer to the following file for the complete list of keystrokes: