Configuration
Config file location
| OS | Path |
|---|---|
| Linux / macOS | ~/.config/lazygit/config.yml |
| Windows | %APPDATA%\lazygit\config.yml |
| XDG override | $XDG_CONFIG_HOME/lazygit/config.yml |
You can open the config file from inside lazygit: press o in the status panel.
Example config
~/.config/lazygit/config.yml yaml
# ~/.config/lazygit/config.yml
gui:
theme:
activeBorderColor:
- green
- bold
showIcons: true
git:
paging:
colorArg: always
pager: delta --dark --paging=never
commit:
signOff: false
keybinding:
universal:
quit: 'q'
return: '<esc>' Custom pagers
lazygit supports custom diff pagers like delta and diff-so-fancy.
Using delta
git:
paging:
colorArg: always
pager: delta --dark --paging=never Using diff-so-fancy
git:
paging:
colorArg: always
pager: diff-so-fancy Custom keybindings
You can add custom commands bound to any key. The command receives context like the selected branch, file, or commit.
customCommands:
- key: 'P'
command: 'git push --force-with-lease origin {{.SelectedLocalBranch.Name}}'
context: 'localBranches'
description: 'Force push with lease'
loadingText: 'Force pushing...' See the official Custom Command Keybindings docs ↗ for the full reference.
Environment variables
| Variable | Effect |
|---|---|
LG_CONFIG_FILE | Override config file path |
GIT_CONFIG | Override git config path |
EDITOR | Editor used when lazygit opens a file |
Full reference
For all available config options, see the official Config.md on GitHub ↗.