Type UserConfig
File match **/lazygit/config.yml lazygit.yml .lazygit.yml
Schema URL https://catalog.lintel.tools/schemas/schemastore/lazygit/latest.json
Source https://raw.githubusercontent.com/jesseduffield/lazygit/master/schema/config.json

Validate with Lintel

npx @lintel/lintel check
Type: UserConfig

Definitions

CommitConfig object

Config relating to committing

signOff boolean

If true, pass '--signoff' flag when committing

Default: false
autoWrapCommitMessage boolean

Automatic WYSIWYG wrapping of the commit message as you type

Default: true
autoWrapWidth integer

If autoWrapCommitMessage is true, the width to wrap to

Default: 72
CommitLengthConfig object

Config relating to the commit length indicator

show boolean

If true, show an indicator of commit message length

Default: true
CommitPrefixConfig object
pattern string

pattern to match on. E.g. for 'feature/AB-123' to match on the AB-123 use "^\w+\/(\w+-\w+).*"

Examples: "^\w+\/(\w+-\w+).*"
replace string

Replace directive. E.g. for 'feature/AB-123' to start the commit message with 'AB-123 ' use "[$1] "

Examples: "[$1]"
CustomCommand object
key string

The key to trigger the command. Use a single letter or one of the values from https://github.com/jesseduffield/lazygit/blob/master/docs/keybindings/Custom_Keybindings.md

commandMenu CustomCommand[]

Instead of defining a single custom command, create a menu of custom commands. Useful for grouping related commands together under a single keybinding, and for keeping them out of the global keybindings menu. When using this, all other fields except Key and Description are ignored and must be empty.

context string

The context in which to listen for the key. Valid values are: status, files, worktrees, localBranches, remotes, remoteBranches, tags, commits, reflogCommits, subCommits, commitFiles, stash, and global. Multiple contexts separated by comma are allowed; most useful for "commits, subCommits" or "files, commitFiles".

Examples: "status", "files", "worktrees", "localBranches", "remotes", "remoteBranches", "tags", "commits", "reflogCommits", "subCommits", "commitFiles", "stash", "global"
command string

The command to run (using Go template syntax for placeholder values)

Examples: "git fetch {{.Form.Remote}} {{.Form.Branch}} && git checkout FETCH_HEAD"

A list of prompts that will request user input before running the final command

loadingText string

Text to display while waiting for command to finish

Examples: "Loading..."
description string

Label for the custom command when displayed in the keybindings menu

output string

Where the output of the command should go. 'none' discards it, 'terminal' suspends lazygit and runs the command in the terminal (useful for commands that require user input), 'log' streams it to the command log, 'logWithPty' is like 'log' but runs the command in a pseudo terminal (can be useful for commands that produce colored output when the output is a terminal), and 'popup' shows it in a popup.

Values: "none" "terminal" "log" "logWithPty" "popup"
outputTitle string

The title to display in the popup panel if output is set to 'popup'. If left unset, the command will be used as the title.

after object
1 nested properties
checkForConflicts boolean
CustomCommandAfterHook object
checkForConflicts boolean
CustomCommandMenuOption object
name string

The first part of the label

description string

The second part of the label

value string

The value that will be used in the command

Examples: "feature"
minLength=1
key string

Keybinding to invoke this menu option without needing to navigate to it

CustomCommandPrompt object
type string

One of: 'input' | 'menu' | 'confirm' | 'menuFromCommand'

key string

Used to reference the entered value from within the custom command. E.g. a prompt with key: 'Branch' can be referred to as {{.Form.Branch}} in the command

title string

The title to display in the popup panel

initialValue string

The initial value to appear in the text box. Only for input prompts.

suggestions object
2 nested properties
preset string

Uses built-in logic to obtain the suggestions. One of 'authors' | 'branches' | 'files' | 'refs' | 'remotes' | 'remoteBranches' | 'tags'

Values: "authors" "branches" "files" "refs" "remotes" "remoteBranches" "tags"
command string

Command to run such that each line in the output becomes a suggestion. Mutually exclusive with 'preset' field.

Examples: "git fetch {{.Form.Remote}} {{.Form.Branch}} && git checkout FETCH_HEAD"
body string

The message of the confirmation prompt. Only for confirm prompts.

Examples: "Are you sure you want to push to the remote?"

Menu options. Only for menu prompts.

command string

The command to run to generate menu options Only for menuFromCommand prompts.

Examples: "git fetch {{.Form.Remote}} {{.Form.Branch}} && git checkout FETCH_HEAD"
filter string

The regexp to run specifying groups which are going to be kept from the command's output. Only for menuFromCommand prompts.

Examples: ".*{{.SelectedRemote.Name }}/(?P<branch>.*)"
valueFormat string

How to format matched groups from the filter to construct a menu item's value. Only for menuFromCommand prompts.

Examples: "{{ .branch }}"
labelFormat string

Like valueFormat but for the labels. If labelFormat is not specified, valueFormat is shown instead. Only for menuFromCommand prompts.

Examples: "{{ .branch | green }}"
condition string

A Go template expression evaluated against the current form state. If it resolves to empty string or 'false', the prompt is skipped.

Examples: "{{ eq .Form.Choice "yes" }}"
CustomCommandSuggestions object
preset string

Uses built-in logic to obtain the suggestions. One of 'authors' | 'branches' | 'files' | 'refs' | 'remotes' | 'remoteBranches' | 'tags'

Values: "authors" "branches" "files" "refs" "remotes" "remoteBranches" "tags"
command string

Command to run such that each line in the output becomes a suggestion. Mutually exclusive with 'preset' field.

Examples: "git fetch {{.Form.Remote}} {{.Form.Branch}} && git checkout FETCH_HEAD"
CustomIconsConfig object
filenames Record<string, object>

Map of filenames to icon properties (icon and color)

extensions Record<string, object>

Map of file extensions (including the dot) to icon properties (icon and color)

GitConfig object

Config relating to git

Array of pagers. Each entry has the following format:

Value of the --color arg in the git diff command. Some pagers want

this to be set to 'always' and some want it set to 'never'

colorArg: "always"

e.g.

diff-so-fancy

delta --dark --paging=never

ydiff -p cat -s --wrap --width={{columnWidth}}

pager: ""

e.g. 'difft --color=always'

externalDiffCommand: ""

If true, Lazygit will use git's diff.external config for paging.

The advantage over externalDiffCommand is that this can be

configured per file type in .gitattributes; see

https://git-scm.com/docs/gitattributes#_defining_an_external_diff_driver.

useExternalDiffGitConfig: false

See https://github.com/jesseduffield/lazygit/blob/master/docs/Custom_Pagers.md for more information.

commit object

Config relating to committing

3 nested properties
signOff boolean

If true, pass '--signoff' flag when committing

Default: false
autoWrapCommitMessage boolean

Automatic WYSIWYG wrapping of the commit message as you type

Default: true
autoWrapWidth integer

If autoWrapCommitMessage is true, the width to wrap to

Default: 72
merging object

Config relating to merging

3 nested properties
manualCommit boolean

If true, run merges in a subprocess so that if a commit message is required, Lazygit will not hang Only applicable to unix users.

Default: false
args string

Extra args passed to git merge, e.g. --no-ff

Examples: "--no-ff"
squashMergeMessage string

The commit message to use for a squash merge commit. Can contain "{{selectedRef}}" and "{{currentBranch}}" placeholders.

Default: "Squash merge {{selectedRef}} into {{currentBranch}}"
mainBranches string[]

list of branches that are considered 'main' branches, used when displaying commits

Default:
[
  "master",
  "main"
]
uniqueItems=true
skipHookPrefix string

Prefix to use when skipping hooks. E.g. if set to 'WIP', then pre-commit hooks will be skipped when the commit message starts with 'WIP'

Default: "WIP"
autoFetch boolean

If true, periodically fetch from remote

Default: true
autoRefresh boolean

If true, periodically refresh files and submodules

Default: true
autoForwardBranches string

If not "none", lazygit will automatically fast-forward local branches to match their upstream after fetching. Applies to branches that are not the currently checked out branch, and only to those that are strictly behind their upstream (as opposed to diverged). Possible values: 'none' | 'onlyMainBranches' | 'allBranches'

Default: "onlyMainBranches"
Values: "none" "onlyMainBranches" "allBranches"
fetchAll boolean

If true, pass the --all arg to git fetch

Default: true
autoStageResolvedConflicts boolean

If true, lazygit will automatically stage files that used to have merge conflicts but no longer do; and it will also ask you if you want to continue a merge or rebase if you've resolved all conflicts. If false, it won't do either of these things.

Default: true
branchLogCmd string

Command used when displaying the current branch git log in the main window

Default: "git log --graph --color=always --abbrev-commit --decorate --date=relative --pretty=medium {{branchName}} --"
allBranchesLogCmds string[]

Commands used to display git log of all branches in the main window, they will be cycled in order of appearance (array of strings)

Default:
[
  "git log --graph --all --color=always --abbrev-commit --decorate --date=relative  --pretty=medium"
]
ignoreWhitespaceInDiffView boolean

If true, git diffs are rendered with the --ignore-all-space flag, which ignores whitespace changes. Can be toggled from within Lazygit with <c-w>.

Default: false
diffContextSize integer

The number of lines of context to show around each diff hunk. Can be changed from within Lazygit with the { and } keys.

Default: 3
renameSimilarityThreshold integer

The threshold for considering a file to be renamed, in percent. Can be changed from within Lazygit with the ( and ) keys.

Default: 50
min=0max=100
overrideGpg boolean

If true, do not spawn a separate process when using GPG

Default: false
disableForcePushing boolean

If true, do not allow force pushes

Default: false
parseEmoji boolean

If true, parse emoji strings in commit messages e.g. render :rocket: as 🚀 (This should really be under 'gui', not 'git')

Default: false
log object

Config for showing the log in the commits view

3 nested properties
order string

One of: 'date-order' | 'author-date-order' | 'topo-order' | 'default' 'topo-order' makes it easier to read the git log graph, but commits may not appear chronologically. See https://git-scm.com/docs/

Can be changed from within Lazygit with Log menu -> Commit sort order (<c-l> in the commits window by default).

Default: "topo-order"
Values: "date-order" "author-date-order" "topo-order" "default"
showGraph string

This determines whether the git graph is rendered in the commits panel One of 'always' | 'never' | 'when-maximised'

Can be toggled from within lazygit with Log menu -> Show git graph (<c-l> in the commits window by default).

Default: "always"
Values: "always" "never" "when-maximised"
showWholeGraph boolean

displays the whole git graph by default in the commits view (equivalent to passing the --all argument to git log)

Default: false
localBranchSortOrder string

How branches are sorted in the local branches view. One of: 'date' (default) | 'recency' | 'alphabetical' Can be changed from within Lazygit with the Sort Order menu (s) in the branches panel.

Default: "date"
Values: "date" "recency" "alphabetical"
remoteBranchSortOrder string

How branches are sorted in the remote branches view. One of: 'date' (default) | 'alphabetical' Can be changed from within Lazygit with the Sort Order menu (s) in the remote branches panel.

Default: "date"
Values: "date" "alphabetical"
truncateCopiedCommitHashesTo integer

When copying commit hashes to the clipboard, truncate them to this length. Set to 40 to disable truncation.

Default: 12
GuiConfig object

Config relating to the Lazygit UI

branchColors Record<string, string>
customIcons object
2 nested properties
filenames Record<string, object>

Map of filenames to icon properties (icon and color)

extensions Record<string, object>

Map of file extensions (including the dot) to icon properties (icon and color)

scrollHeight integer

The number of lines you scroll by when scrolling the main window

Default: 2
min=1
scrollPastBottom boolean

If true, allow scrolling past the bottom of the content in the main window

Default: true
scrollOffBehavior string

One of: 'margin' (default) | 'jump'

Default: "margin"
tabWidth integer

The number of spaces per tab; used for everything that's shown in the main view, but probably mostly relevant for diffs. Note that when using a pager, the pager has its own tab width setting, so you need to pass it separately in the pager command.

Default: 4
min=1
mouseEvents boolean

If true, capture mouse events. When mouse events are captured, it's a little harder to select text: e.g. requiring you to hold the option key when on macOS.

Default: true
skipAmendWarning boolean

If true, do not show a warning when amending a commit.

Default: false
skipDiscardChangeWarning boolean

If true, do not show a warning when discarding changes in the staging view.

Default: false
skipStashWarning boolean

If true, do not show warning when applying/popping the stash

Default: false
skipNoStagedFilesWarning boolean

If true, do not show a warning when attempting to commit without any staged files; instead stage all unstaged files.

Default: false
skipRewordInEditorWarning boolean

If true, do not show a warning when rewording a commit via an external editor

Default: false
skipSwitchWorktreeOnCheckoutWarning boolean

If true, switch to a different worktree without confirmation when checking out a branch that is checked out in that worktree

Default: false
sidePanelWidth number

Fraction of the total screen width to use for the left side section. You may want to pick a small number (e.g. 0.2) if you're using a narrow screen, so that you can see more of the main section. Number from 0 to 1.0.

Default: 0.3333
min=0max=1
expandFocusedSidePanel boolean

If true, increase the height of the focused side window; creating an accordion effect.

Default: false
expandedSidePanelWeight integer

The weight of the expanded side panel, relative to the other panels. 2 means twice as tall as the other panels. Only relevant if expandFocusedSidePanel is true.

Default: 2
mainPanelSplitMode string

Sometimes the main window is split in two (e.g. when the selected file has both staged and unstaged changes). This setting controls how the two sections are split. Options are:

  • 'horizontal': split the window horizontally
  • 'vertical': split the window vertically
  • 'flexible': (default) split the window horizontally if the window is wide enough, otherwise split vertically
Default: "flexible"
Values: "horizontal" "flexible" "vertical"
enlargedSideViewLocation string

How the window is split when in half screen mode (i.e. after hitting '+' once). Possible values:

  • 'left': split the window horizontally (side panel on the left, main view on the right)
  • 'top': split the window vertically (side panel on top, main view below)
Default: "left"
wrapLinesInStagingView boolean

If true, wrap lines in the staging view to the width of the view. This makes it much easier to work with diffs that have long lines, e.g. paragraphs of markdown text.

Default: true
useHunkModeInStagingView boolean

If true, hunk selection mode will be enabled by default when entering the staging view.

Default: true
language string

One of 'auto' (default) | 'en' | 'zh-CN' | 'zh-TW' | 'pl' | 'nl' | 'ja' | 'ko' | 'ru' | 'pt'

Default: "auto"
Values: "auto" "en" "zh-TW" "zh-CN" "pl" "nl" "ja" "ko" "ru"
timeFormat string

Format used when displaying time e.g. commit time. Uses Go's time format syntax: https://pkg.go.dev/time#Time.Format

Default: "02 Jan 06"
shortTimeFormat string

Format used when displaying time if the time is less than 24 hours ago. Uses Go's time format syntax: https://pkg.go.dev/time#Time.Format

Default: "3:04PM"
theme object
12 nested properties
activeBorderColor string[]

Border color of focused window

Default:
[
  "green",
  "bold"
]
minItems=1uniqueItems=true
inactiveBorderColor string[]

Border color of non-focused windows

Default:
[
  "default"
]
minItems=1uniqueItems=true
searchingActiveBorderColor string[]

Border color of focused window when searching in that window

Default:
[
  "cyan",
  "bold"
]
minItems=1uniqueItems=true
optionsTextColor string[]

Color of keybindings help text in the bottom line

Default:
[
  "blue"
]
minItems=1uniqueItems=true
selectedLineBgColor string[]
Default:
[
  "blue"
]
minItems=1uniqueItems=true
inactiveViewSelectedLineBgColor string[]

Background color of selected line when view doesn't have focus.

Default:
[
  "bold"
]
minItems=1uniqueItems=true
cherryPickedCommitFgColor string[]

Foreground color of copied commit

Default:
[
  "blue"
]
minItems=1uniqueItems=true
cherryPickedCommitBgColor string[]

Background color of copied commit

Default:
[
  "cyan"
]
minItems=1uniqueItems=true
markedBaseCommitFgColor string[]

Foreground color of marked base commit (for rebase)

Default:
[
  "blue"
]
markedBaseCommitBgColor string[]

Background color of marked base commit (for rebase)

Default:
[
  "yellow"
]
unstagedChangesColor string[]

Color for file with unstaged changes

Default:
[
  "red"
]
minItems=1uniqueItems=true
defaultFgColor string[]

Default text color

Default:
[
  "default"
]
minItems=1uniqueItems=true
commitLength object

Config relating to the commit length indicator

1 nested properties
show boolean

If true, show an indicator of commit message length

Default: true
showListFooter boolean

If true, show the '5 of 20' footer at the bottom of list views

Default: true
showFileTree boolean

If true, display the files in the file views as a tree. If false, display the files as a flat list. This can be toggled from within Lazygit with the '`' key, but that will not change the default.

Default: true
showRootItemInFileTree boolean

If true, add a "/" root item in the file tree representing the root of the repository. It is only added when necessary, i.e. when there is more than one item at top level.

Default: true
fileTreeSortOrder string

How to sort files and directories in the file tree. One of: 'mixed' (default) | 'filesFirst' | 'foldersFirst'

Default: "mixed"
Values: "mixed" "filesFirst" "foldersFirst"
fileTreeSortCaseSensitive boolean

If true (default), sort the file tree case-sensitively.

Default: true
showNumstatInFilesView boolean

If true, show the number of lines changed per file in the Files view

Default: false
showRandomTip boolean

If true, show a random tip in the command log when Lazygit starts

Default: true
showCommandLog boolean

If true, show the command log

Default: true
showBottomLine boolean

If true, show the bottom line that contains keybinding info and useful buttons. If false, this line will be hidden except to display a loader for an in-progress action.

Default: true
showPanelJumps boolean

If true, show jump-to-window keybindings in window titles.

Default: true
showIcons boolean

Deprecated: use nerdFontsVersion instead

Default: false
nerdFontsVersion string

Nerd fonts version to use. One of: '2' | '3' | empty string (default) If empty, do not show icons.

Values: "2" "3" ""
showFileIcons boolean

If true (default), file icons are shown in the file views. Only relevant if NerdFontsVersion is not empty.

Default: true
commitAuthorShortLength integer

Length of author name in (non-expanded) commits view. 2 means show initials only.

Default: 2
commitAuthorLongLength integer

Length of author name in expanded commits view. 2 means show initials only.

Default: 17
commitHashLength integer

Length of commit hash in commits view. 0 shows '*' if NF icons aren't on.

Default: 8
min=0
showBranchCommitHash boolean

If true, show commit hashes alongside branch names in the branches view.

Default: false
showDivergenceFromBaseBranch string

Whether to show the divergence from the base branch in the branches view. One of: 'none' | 'onlyArrow' | 'arrowAndNumber'

Default: "none"
Values: "none" "onlyArrow" "arrowAndNumber"
commandLogSize integer

Height of the command log view

Default: 8
min=0
splitDiff string

Whether to split the main window when viewing file changes. One of: 'auto' | 'always' If 'auto', only split the main window when a file has both staged and unstaged changes

Default: "auto"
Values: "auto" "always"
screenMode string

Default size for focused window. Can be changed from within Lazygit with '+' and '_' (but this won't change the default). One of: 'normal' (default) | 'half' | 'full'

Default: "normal"
Values: "normal" "half" "full"
border string

Window border style. One of 'rounded' (default) | 'single' | 'double' | 'hidden' | 'bold'

Default: "rounded"
Values: "single" "double" "rounded" "hidden" "bold"
animateExplosion boolean

If true, show a seriously epic explosion animation when nuking the working tree.

Default: true
portraitMode string

Whether to stack UI components on top of each other. One of 'auto' (default) | 'always' | 'never'

Default: "auto"
portraitModeAutoMaxWidth integer

In 'auto' mode, portrait mode will be used if the window width is less than or equal to portraitModeAutoMaxWidth and the window height is greater than or equal to portraitModeAutoMinHeight. Unused when portraitMode is not 'auto'.

Default: 84
portraitModeAutoMinHeight integer

In 'auto' mode, portrait mode will be used if the window width is less than or equal to portraitModeAutoMaxWidth and the window height is greater than or equal to portraitModeAutoMinHeight. Unused when portraitMode is not 'auto'.

Default: 46
filterMode string

How things are filtered when typing '/'. One of 'substring' (default) | 'fuzzy'

Default: "substring"
Values: "substring" "fuzzy"
spinner object

Config relating to the spinner.

2 nested properties
frames string[]

The frames of the spinner animation.

Default:
[
  "|",
  "/",
  "-",
  "\\"
]
rate integer

The "speed" of the spinner in milliseconds.

Default: 50
min=1
statusPanelView string

Status panel view. One of 'dashboard' (default) | 'allBranchesLog'

Default: "dashboard"
Values: "dashboard" "allBranchesLog"
switchToFilesAfterStashPop boolean

If true, jump to the Files panel after popping a stash

Default: true
switchToFilesAfterStashApply boolean

If true, jump to the Files panel after applying a stash

Default: true
switchTabsWithPanelJumpKeys boolean

If true, when using the panel jump keys (default 1 through 5) and target panel is already active, go to next tab instead

Default: false
IconProperties object
icon string
color string
KeybindingAmendAttributeConfig object
resetAuthor string
Default: "a"
setAuthor string
Default: "A"
addCoAuthor string
Default: "c"
KeybindingBranchesConfig object
createPullRequest string
Default: "o"
viewPullRequestOptions string
Default: "O"
openPullRequestInBrowser string
Default: "G"
copyPullRequestURL string
Default: "<c-y>"
checkoutBranchByName string
Default: "c"
forceCheckoutBranch string
Default: "F"
checkoutPreviousBranch string
Default: "-"
rebaseBranch string
Default: "r"
renameBranch string
Default: "R"
mergeIntoCurrentBranch string
Default: "M"
moveCommitsToNewBranch string
Default: "N"
viewGitFlowOptions string
Default: "i"
fastForward string
Default: "f"
createTag string
Default: "T"
pushTag string
Default: "P"
setUpstream string
Default: "u"
fetchRemote string
Default: "f"
addForkRemote string
Default: "F"
sortOrder string
Default: "s"
KeybindingCommitFilesConfig object
checkoutCommitFile string
Default: "c"
KeybindingCommitMessageConfig object
commitMenu string
Default: "<c-o>"
KeybindingCommitsConfig object
squashDown string
Default: "s"
renameCommit string
Default: "r"
renameCommitWithEditor string
Default: "R"
viewResetOptions string
Default: "g"
markCommitAsFixup string
Default: "f"
setFixupMessage string
Default: "c"
createFixupCommit string
Default: "F"
squashAboveCommits string
Default: "S"
moveDownCommit string
Default: "<c-j>"
moveUpCommit string
Default: "<c-k>"
amendToCommit string
Default: "A"
resetCommitAuthor string
Default: "a"
pickCommit string
Default: "p"
revertCommit string
Default: "t"
cherryPickCopy string
Default: "C"
pasteCommits string
Default: "V"
markCommitAsBaseForRebase string
Default: "B"
tagCommit string
Default: "T"
checkoutCommit string
Default: "<space>"
resetCherryPick string
Default: "<c-R>"
copyCommitAttributeToClipboard string
Default: "y"
openLogMenu string
Default: "<c-l>"
openInBrowser string
Default: "o"
openPullRequestInBrowser string
Default: "G"
viewBisectOptions string
Default: "b"
startInteractiveRebase string
Default: "i"
selectCommitsOfCurrentBranch string
Default: "*"
KeybindingConfig object

Keybindings

universal object
77 nested properties
quit string
Default: "q"
quit-alt1 string
Default: "<c-c>"
suspendApp string
Default: "<c-z>"
return string
Default: "<esc>"
quitWithoutChangingDirectory string
Default: "Q"
togglePanel string
Default: "<tab>"
prevItem string
Default: "<up>"
nextItem string
Default: "<down>"
prevItem-alt string
Default: "k"
nextItem-alt string
Default: "j"
prevPage string
Default: ","
nextPage string
Default: "."
scrollLeft string
Default: "H"
scrollRight string
Default: "L"
gotoTop string
Default: "<"
gotoBottom string
Default: ">"
gotoTop-alt string
Default: "<home>"
gotoBottom-alt string
Default: "<end>"
toggleRangeSelect string
Default: "v"
rangeSelectDown string
Default: "<s-down>"
rangeSelectUp string
Default: "<s-up>"
prevBlock string
Default: "<left>"
nextBlock string
Default: "<right>"
prevBlock-alt string
Default: "h"
nextBlock-alt string
Default: "l"
nextBlock-alt2 string
Default: "<tab>"
prevBlock-alt2 string
Default: "<backtab>"
jumpToBlock string[]
Default:
[
  "1",
  "2",
  "3",
  "4",
  "5"
]
focusMainView string
Default: "0"
nextMatch string
Default: "n"
prevMatch string
Default: "N"
startSearch string
Default: "/"
optionMenu string
Default: "<disabled>"
optionMenu-alt1 string
Default: "?"
select string
Default: "<space>"
goInto string
Default: "<enter>"
confirm string
Default: "<enter>"
confirmMenu string
Default: "<enter>"
confirmSuggestion string
Default: "<enter>"
confirmInEditor string
Default: "<a-enter>"
confirmInEditor-alt string
Default: "<c-s>"
remove string
Default: "d"
new string
Default: "n"
edit string
Default: "e"
openFile string
Default: "o"
scrollUpMain string
Default: "<pgup>"
scrollDownMain string
Default: "<pgdown>"
scrollUpMain-alt1 string
Default: "K"
scrollDownMain-alt1 string
Default: "J"
scrollUpMain-alt2 string
Default: "<c-u>"
scrollDownMain-alt2 string
Default: "<c-d>"
executeShellCommand string
Default: ":"
createRebaseOptionsMenu string
Default: "m"
pushFiles string

'Files' appended for legacy reasons

Default: "P"
pullFiles string

'Files' appended for legacy reasons

Default: "p"
refresh string
Default: "R"
createPatchOptionsMenu string
Default: "<c-p>"
nextTab string
Default: "]"
prevTab string
Default: "["
nextScreenMode string
Default: "+"
prevScreenMode string
Default: "_"
cyclePagers string
Default: "|"
undo string
Default: "z"
redo string
Default: "Z"
filteringMenu string
Default: "<c-s>"
diffingMenu string
Default: "W"
diffingMenu-alt string
Default: "<c-e>"
copyToClipboard string
Default: "<c-o>"
openRecentRepos string
Default: "<c-r>"
submitEditorText string
Default: "<enter>"
extrasMenu string
Default: "@"
toggleWhitespaceInDiffView string
Default: "<c-w>"
increaseContextInDiffView string
Default: "}"
decreaseContextInDiffView string
Default: "{"
increaseRenameSimilarityThreshold string
Default: ")"
decreaseRenameSimilarityThreshold string
Default: "("
openDiffTool string
Default: "<c-t>"
status object
4 nested properties
checkForUpdate string
Default: "u"
recentRepos string
Default: "<enter>"
allBranchesLogGraph string
Default: "a"
allBranchesLogGraphReverse string
Default: "A"
files object
19 nested properties
commitChanges string
Default: "c"
commitChangesWithoutHook string
Default: "w"
amendLastCommit string
Default: "A"
commitChangesWithEditor string
Default: "C"
findBaseCommitForFixup string
Default: "<c-f>"
confirmDiscard string
Default: "x"
ignoreFile string
Default: "i"
refreshFiles string
Default: "r"
stashAllChanges string
Default: "s"
viewStashOptions string
Default: "S"
toggleStagedAll string
Default: "a"
viewResetOptions string
Default: "D"
fetch string
Default: "f"
toggleTreeView string
Default: "`"
openMergeOptions string
Default: "M"
openStatusFilter string
Default: "<c-b>"
copyFileInfoToClipboard string
Default: "y"
collapseAll string
Default: "-"
expandAll string
Default: "="
branches object
19 nested properties
createPullRequest string
Default: "o"
viewPullRequestOptions string
Default: "O"
openPullRequestInBrowser string
Default: "G"
copyPullRequestURL string
Default: "<c-y>"
checkoutBranchByName string
Default: "c"
forceCheckoutBranch string
Default: "F"
checkoutPreviousBranch string
Default: "-"
rebaseBranch string
Default: "r"
renameBranch string
Default: "R"
mergeIntoCurrentBranch string
Default: "M"
moveCommitsToNewBranch string
Default: "N"
viewGitFlowOptions string
Default: "i"
fastForward string
Default: "f"
createTag string
Default: "T"
pushTag string
Default: "P"
setUpstream string
Default: "u"
fetchRemote string
Default: "f"
addForkRemote string
Default: "F"
sortOrder string
Default: "s"
worktrees object
1 nested properties
viewWorktreeOptions string
Default: "w"
commits object
27 nested properties
squashDown string
Default: "s"
renameCommit string
Default: "r"
renameCommitWithEditor string
Default: "R"
viewResetOptions string
Default: "g"
markCommitAsFixup string
Default: "f"
setFixupMessage string
Default: "c"
createFixupCommit string
Default: "F"
squashAboveCommits string
Default: "S"
moveDownCommit string
Default: "<c-j>"
moveUpCommit string
Default: "<c-k>"
amendToCommit string
Default: "A"
resetCommitAuthor string
Default: "a"
pickCommit string
Default: "p"
revertCommit string
Default: "t"
cherryPickCopy string
Default: "C"
pasteCommits string
Default: "V"
markCommitAsBaseForRebase string
Default: "B"
tagCommit string
Default: "T"
checkoutCommit string
Default: "<space>"
resetCherryPick string
Default: "<c-R>"
copyCommitAttributeToClipboard string
Default: "y"
openLogMenu string
Default: "<c-l>"
openInBrowser string
Default: "o"
openPullRequestInBrowser string
Default: "G"
viewBisectOptions string
Default: "b"
startInteractiveRebase string
Default: "i"
selectCommitsOfCurrentBranch string
Default: "*"
amendAttribute object
3 nested properties
resetAuthor string
Default: "a"
setAuthor string
Default: "A"
addCoAuthor string
Default: "c"
stash object
2 nested properties
popStash string
Default: "g"
renameStash string
Default: "r"
commitFiles object
1 nested properties
checkoutCommitFile string
Default: "c"
main object
3 nested properties
toggleSelectHunk string
Default: "a"
pickBothHunks string
Default: "b"
editSelectHunk string
Default: "E"
submodules object
3 nested properties
init string
Default: "i"
update string
Default: "u"
bulkMenu string
Default: "b"
commitMessage object
1 nested properties
commitMenu string
Default: "<c-o>"
KeybindingFilesConfig object
commitChanges string
Default: "c"
commitChangesWithoutHook string
Default: "w"
amendLastCommit string
Default: "A"
commitChangesWithEditor string
Default: "C"
findBaseCommitForFixup string
Default: "<c-f>"
confirmDiscard string
Default: "x"
ignoreFile string
Default: "i"
refreshFiles string
Default: "r"
stashAllChanges string
Default: "s"
viewStashOptions string
Default: "S"
toggleStagedAll string
Default: "a"
viewResetOptions string
Default: "D"
fetch string
Default: "f"
toggleTreeView string
Default: "`"
openMergeOptions string
Default: "M"
openStatusFilter string
Default: "<c-b>"
copyFileInfoToClipboard string
Default: "y"
collapseAll string
Default: "-"
expandAll string
Default: "="
KeybindingMainConfig object
toggleSelectHunk string
Default: "a"
pickBothHunks string
Default: "b"
editSelectHunk string
Default: "E"
KeybindingStashConfig object
popStash string
Default: "g"
renameStash string
Default: "r"
KeybindingStatusConfig object
checkForUpdate string
Default: "u"
recentRepos string
Default: "<enter>"
allBranchesLogGraph string
Default: "a"
allBranchesLogGraphReverse string
Default: "A"
KeybindingSubmodulesConfig object
init string
Default: "i"
update string
Default: "u"
bulkMenu string
Default: "b"
KeybindingUniversalConfig object
quit string
Default: "q"
quit-alt1 string
Default: "<c-c>"
suspendApp string
Default: "<c-z>"
return string
Default: "<esc>"
quitWithoutChangingDirectory string
Default: "Q"
togglePanel string
Default: "<tab>"
prevItem string
Default: "<up>"
nextItem string
Default: "<down>"
prevItem-alt string
Default: "k"
nextItem-alt string
Default: "j"
prevPage string
Default: ","
nextPage string
Default: "."
scrollLeft string
Default: "H"
scrollRight string
Default: "L"
gotoTop string
Default: "<"
gotoBottom string
Default: ">"
gotoTop-alt string
Default: "<home>"
gotoBottom-alt string
Default: "<end>"
toggleRangeSelect string
Default: "v"
rangeSelectDown string
Default: "<s-down>"
rangeSelectUp string
Default: "<s-up>"
prevBlock string
Default: "<left>"
nextBlock string
Default: "<right>"
prevBlock-alt string
Default: "h"
nextBlock-alt string
Default: "l"
nextBlock-alt2 string
Default: "<tab>"
prevBlock-alt2 string
Default: "<backtab>"
jumpToBlock string[]
Default:
[
  "1",
  "2",
  "3",
  "4",
  "5"
]
focusMainView string
Default: "0"
nextMatch string
Default: "n"
prevMatch string
Default: "N"
startSearch string
Default: "/"
optionMenu string
Default: "<disabled>"
optionMenu-alt1 string
Default: "?"
select string
Default: "<space>"
goInto string
Default: "<enter>"
confirm string
Default: "<enter>"
confirmMenu string
Default: "<enter>"
confirmSuggestion string
Default: "<enter>"
confirmInEditor string
Default: "<a-enter>"
confirmInEditor-alt string
Default: "<c-s>"
remove string
Default: "d"
new string
Default: "n"
edit string
Default: "e"
openFile string
Default: "o"
scrollUpMain string
Default: "<pgup>"
scrollDownMain string
Default: "<pgdown>"
scrollUpMain-alt1 string
Default: "K"
scrollDownMain-alt1 string
Default: "J"
scrollUpMain-alt2 string
Default: "<c-u>"
scrollDownMain-alt2 string
Default: "<c-d>"
executeShellCommand string
Default: ":"
createRebaseOptionsMenu string
Default: "m"
pushFiles string

'Files' appended for legacy reasons

Default: "P"
pullFiles string

'Files' appended for legacy reasons

Default: "p"
refresh string
Default: "R"
createPatchOptionsMenu string
Default: "<c-p>"
nextTab string
Default: "]"
prevTab string
Default: "["
nextScreenMode string
Default: "+"
prevScreenMode string
Default: "_"
cyclePagers string
Default: "|"
undo string
Default: "z"
redo string
Default: "Z"
filteringMenu string
Default: "<c-s>"
diffingMenu string
Default: "W"
diffingMenu-alt string
Default: "<c-e>"
copyToClipboard string
Default: "<c-o>"
openRecentRepos string
Default: "<c-r>"
submitEditorText string
Default: "<enter>"
extrasMenu string
Default: "@"
toggleWhitespaceInDiffView string
Default: "<c-w>"
increaseContextInDiffView string
Default: "}"
decreaseContextInDiffView string
Default: "{"
increaseRenameSimilarityThreshold string
Default: ")"
decreaseRenameSimilarityThreshold string
Default: "("
openDiffTool string
Default: "<c-t>"
KeybindingWorktreesConfig object
viewWorktreeOptions string
Default: "w"
LogConfig object

Config for showing the log in the commits view

order string

One of: 'date-order' | 'author-date-order' | 'topo-order' | 'default' 'topo-order' makes it easier to read the git log graph, but commits may not appear chronologically. See https://git-scm.com/docs/

Can be changed from within Lazygit with Log menu -> Commit sort order (<c-l> in the commits window by default).

Default: "topo-order"
Values: "date-order" "author-date-order" "topo-order" "default"
showGraph string

This determines whether the git graph is rendered in the commits panel One of 'always' | 'never' | 'when-maximised'

Can be toggled from within lazygit with Log menu -> Show git graph (<c-l> in the commits window by default).

Default: "always"
Values: "always" "never" "when-maximised"
showWholeGraph boolean

displays the whole git graph by default in the commits view (equivalent to passing the --all argument to git log)

Default: false
MergingConfig object

Config relating to merging

manualCommit boolean

If true, run merges in a subprocess so that if a commit message is required, Lazygit will not hang Only applicable to unix users.

Default: false
args string

Extra args passed to git merge, e.g. --no-ff

Examples: "--no-ff"
squashMergeMessage string

The commit message to use for a squash merge commit. Can contain "{{selectedRef}}" and "{{currentBranch}}" placeholders.

Default: "Squash merge {{selectedRef}} into {{currentBranch}}"
OSConfig object

Config relating to things outside of Lazygit like how files are opened, copying to clipboard, etc

edit string

Command for editing a file. Should contain "{{filename}}".

editAtLine string

Command for editing a file at a given line number. Should contain "{{filename}}", and may optionally contain "{{line}}".

editAtLineAndWait string

Same as EditAtLine, except that the command needs to wait until the window is closed.

editInTerminal boolean

Whether lazygit suspends until an edit process returns

openDirInEditor string

For opening a directory in an editor

editPreset string

A built-in preset that sets all of the above settings. Supported presets are defined in the getPreset function in editor_presets.go.

Examples: "vim", "nvim", "emacs", "nano", "vscode", "sublime", "kakoune", "helix", "xcode", "zed", "acme"
open string

Command for opening a file, as if the file is double-clicked. Should contain "{{filename}}", but doesn't support "{{line}}".

openLink string

Command for opening a link. Should contain "{{link}}".

copyToClipboardCmd string
readFromClipboardCmd string
shellFunctionsFile string

A shell startup file containing shell aliases or shell functions. This will be sourced before running any shell commands, so that shell functions are available in the : command prompt or even in custom commands. See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#using-aliases-or-functions-in-shell-commands

PagingConfig object
colorArg string

Value of the --color arg in the git diff command. Some pagers want this to be set to 'always' and some want it set to 'never'

Values: "always" "never"
pager string

e.g. diff-so-fancy delta --dark --paging=never ydiff -p cat -s --wrap --width={{columnWidth}}

Examples: "delta --dark --paging=never", "diff-so-fancy", "ydiff -p cat -s --wrap --width={{columnWidth}}"
externalDiffCommand string

e.g. 'difft --color=always'

useExternalDiffGitConfig boolean

If true, Lazygit will use git's diff.external config for paging. The advantage over externalDiffCommand is that this can be configured per file type in .gitattributes; see https://git-scm.com/docs/gitattributes#_defining_an_external_diff_driver.

RefresherConfig object

Background refreshes

refreshInterval integer

File/submodule refresh interval in seconds. Auto-refresh can be disabled via option 'git.autoRefresh'.

Default: 10
min=0
fetchInterval integer

Re-fetch interval in seconds. Auto-fetch can be disabled via option 'git.autoFetch'.

Default: 60
min=0
SpinnerConfig object

Config relating to the spinner.

frames string[]

The frames of the spinner animation.

Default:
[
  "|",
  "/",
  "-",
  "\\"
]
rate integer

The "speed" of the spinner in milliseconds.

Default: 50
min=1
ThemeConfig object
activeBorderColor string[]

Border color of focused window

Default:
[
  "green",
  "bold"
]
minItems=1uniqueItems=true
inactiveBorderColor string[]

Border color of non-focused windows

Default:
[
  "default"
]
minItems=1uniqueItems=true
searchingActiveBorderColor string[]

Border color of focused window when searching in that window

Default:
[
  "cyan",
  "bold"
]
minItems=1uniqueItems=true
optionsTextColor string[]

Color of keybindings help text in the bottom line

Default:
[
  "blue"
]
minItems=1uniqueItems=true
selectedLineBgColor string[]
Default:
[
  "blue"
]
minItems=1uniqueItems=true
inactiveViewSelectedLineBgColor string[]

Background color of selected line when view doesn't have focus.

Default:
[
  "bold"
]
minItems=1uniqueItems=true
cherryPickedCommitFgColor string[]

Foreground color of copied commit

Default:
[
  "blue"
]
minItems=1uniqueItems=true
cherryPickedCommitBgColor string[]

Background color of copied commit

Default:
[
  "cyan"
]
minItems=1uniqueItems=true
markedBaseCommitFgColor string[]

Foreground color of marked base commit (for rebase)

Default:
[
  "blue"
]
markedBaseCommitBgColor string[]

Background color of marked base commit (for rebase)

Default:
[
  "yellow"
]
unstagedChangesColor string[]

Color for file with unstaged changes

Default:
[
  "red"
]
minItems=1uniqueItems=true
defaultFgColor string[]

Default text color

Default:
[
  "default"
]
minItems=1uniqueItems=true
UpdateConfig object

Periodic update checks

method string

One of: 'prompt' (default) | 'background' | 'never'

Default: "prompt"
Values: "prompt" "background" "never"
days integer

Period in days between update checks

Default: 14
min=0
UserConfig object
gui object

Config relating to the Lazygit UI

60 nested properties
branchColors Record<string, string>
customIcons object
2 nested properties
filenames Record<string, object>

Map of filenames to icon properties (icon and color)

extensions Record<string, object>

Map of file extensions (including the dot) to icon properties (icon and color)

scrollHeight integer

The number of lines you scroll by when scrolling the main window

Default: 2
min=1
scrollPastBottom boolean

If true, allow scrolling past the bottom of the content in the main window

Default: true
scrollOffBehavior string

One of: 'margin' (default) | 'jump'

Default: "margin"
tabWidth integer

The number of spaces per tab; used for everything that's shown in the main view, but probably mostly relevant for diffs. Note that when using a pager, the pager has its own tab width setting, so you need to pass it separately in the pager command.

Default: 4
min=1
mouseEvents boolean

If true, capture mouse events. When mouse events are captured, it's a little harder to select text: e.g. requiring you to hold the option key when on macOS.

Default: true
skipAmendWarning boolean

If true, do not show a warning when amending a commit.

Default: false
skipDiscardChangeWarning boolean

If true, do not show a warning when discarding changes in the staging view.

Default: false
skipStashWarning boolean

If true, do not show warning when applying/popping the stash

Default: false
skipNoStagedFilesWarning boolean

If true, do not show a warning when attempting to commit without any staged files; instead stage all unstaged files.

Default: false
skipRewordInEditorWarning boolean

If true, do not show a warning when rewording a commit via an external editor

Default: false
skipSwitchWorktreeOnCheckoutWarning boolean

If true, switch to a different worktree without confirmation when checking out a branch that is checked out in that worktree

Default: false
sidePanelWidth number

Fraction of the total screen width to use for the left side section. You may want to pick a small number (e.g. 0.2) if you're using a narrow screen, so that you can see more of the main section. Number from 0 to 1.0.

Default: 0.3333
min=0max=1
expandFocusedSidePanel boolean

If true, increase the height of the focused side window; creating an accordion effect.

Default: false
expandedSidePanelWeight integer

The weight of the expanded side panel, relative to the other panels. 2 means twice as tall as the other panels. Only relevant if expandFocusedSidePanel is true.

Default: 2
mainPanelSplitMode string

Sometimes the main window is split in two (e.g. when the selected file has both staged and unstaged changes). This setting controls how the two sections are split. Options are:

  • 'horizontal': split the window horizontally
  • 'vertical': split the window vertically
  • 'flexible': (default) split the window horizontally if the window is wide enough, otherwise split vertically
Default: "flexible"
Values: "horizontal" "flexible" "vertical"
enlargedSideViewLocation string

How the window is split when in half screen mode (i.e. after hitting '+' once). Possible values:

  • 'left': split the window horizontally (side panel on the left, main view on the right)
  • 'top': split the window vertically (side panel on top, main view below)
Default: "left"
wrapLinesInStagingView boolean

If true, wrap lines in the staging view to the width of the view. This makes it much easier to work with diffs that have long lines, e.g. paragraphs of markdown text.

Default: true
useHunkModeInStagingView boolean

If true, hunk selection mode will be enabled by default when entering the staging view.

Default: true
language string

One of 'auto' (default) | 'en' | 'zh-CN' | 'zh-TW' | 'pl' | 'nl' | 'ja' | 'ko' | 'ru' | 'pt'

Default: "auto"
Values: "auto" "en" "zh-TW" "zh-CN" "pl" "nl" "ja" "ko" "ru"
timeFormat string

Format used when displaying time e.g. commit time. Uses Go's time format syntax: https://pkg.go.dev/time#Time.Format

Default: "02 Jan 06"
shortTimeFormat string

Format used when displaying time if the time is less than 24 hours ago. Uses Go's time format syntax: https://pkg.go.dev/time#Time.Format

Default: "3:04PM"
theme object
12 nested properties
activeBorderColor string[]

Border color of focused window

Default:
[
  "green",
  "bold"
]
minItems=1uniqueItems=true
inactiveBorderColor string[]

Border color of non-focused windows

Default:
[
  "default"
]
minItems=1uniqueItems=true
searchingActiveBorderColor string[]

Border color of focused window when searching in that window

Default:
[
  "cyan",
  "bold"
]
minItems=1uniqueItems=true
optionsTextColor string[]

Color of keybindings help text in the bottom line

Default:
[
  "blue"
]
minItems=1uniqueItems=true
selectedLineBgColor string[]
Default:
[
  "blue"
]
minItems=1uniqueItems=true
inactiveViewSelectedLineBgColor string[]

Background color of selected line when view doesn't have focus.

Default:
[
  "bold"
]
minItems=1uniqueItems=true
cherryPickedCommitFgColor string[]

Foreground color of copied commit

Default:
[
  "blue"
]
minItems=1uniqueItems=true
cherryPickedCommitBgColor string[]

Background color of copied commit

Default:
[
  "cyan"
]
minItems=1uniqueItems=true
markedBaseCommitFgColor string[]

Foreground color of marked base commit (for rebase)

Default:
[
  "blue"
]
markedBaseCommitBgColor string[]

Background color of marked base commit (for rebase)

Default:
[
  "yellow"
]
unstagedChangesColor string[]

Color for file with unstaged changes

Default:
[
  "red"
]
minItems=1uniqueItems=true
defaultFgColor string[]

Default text color

Default:
[
  "default"
]
minItems=1uniqueItems=true
commitLength object

Config relating to the commit length indicator

1 nested properties
show boolean

If true, show an indicator of commit message length

Default: true
showListFooter boolean

If true, show the '5 of 20' footer at the bottom of list views

Default: true
showFileTree boolean

If true, display the files in the file views as a tree. If false, display the files as a flat list. This can be toggled from within Lazygit with the '`' key, but that will not change the default.

Default: true
showRootItemInFileTree boolean

If true, add a "/" root item in the file tree representing the root of the repository. It is only added when necessary, i.e. when there is more than one item at top level.

Default: true
fileTreeSortOrder string

How to sort files and directories in the file tree. One of: 'mixed' (default) | 'filesFirst' | 'foldersFirst'

Default: "mixed"
Values: "mixed" "filesFirst" "foldersFirst"
fileTreeSortCaseSensitive boolean

If true (default), sort the file tree case-sensitively.

Default: true
showNumstatInFilesView boolean

If true, show the number of lines changed per file in the Files view

Default: false
showRandomTip boolean

If true, show a random tip in the command log when Lazygit starts

Default: true
showCommandLog boolean

If true, show the command log

Default: true
showBottomLine boolean

If true, show the bottom line that contains keybinding info and useful buttons. If false, this line will be hidden except to display a loader for an in-progress action.

Default: true
showPanelJumps boolean

If true, show jump-to-window keybindings in window titles.

Default: true
showIcons boolean

Deprecated: use nerdFontsVersion instead

Default: false
nerdFontsVersion string

Nerd fonts version to use. One of: '2' | '3' | empty string (default) If empty, do not show icons.

Values: "2" "3" ""
showFileIcons boolean

If true (default), file icons are shown in the file views. Only relevant if NerdFontsVersion is not empty.

Default: true
commitAuthorShortLength integer

Length of author name in (non-expanded) commits view. 2 means show initials only.

Default: 2
commitAuthorLongLength integer

Length of author name in expanded commits view. 2 means show initials only.

Default: 17
commitHashLength integer

Length of commit hash in commits view. 0 shows '*' if NF icons aren't on.

Default: 8
min=0
showBranchCommitHash boolean

If true, show commit hashes alongside branch names in the branches view.

Default: false
showDivergenceFromBaseBranch string

Whether to show the divergence from the base branch in the branches view. One of: 'none' | 'onlyArrow' | 'arrowAndNumber'

Default: "none"
Values: "none" "onlyArrow" "arrowAndNumber"
commandLogSize integer

Height of the command log view

Default: 8
min=0
splitDiff string

Whether to split the main window when viewing file changes. One of: 'auto' | 'always' If 'auto', only split the main window when a file has both staged and unstaged changes

Default: "auto"
Values: "auto" "always"
screenMode string

Default size for focused window. Can be changed from within Lazygit with '+' and '_' (but this won't change the default). One of: 'normal' (default) | 'half' | 'full'

Default: "normal"
Values: "normal" "half" "full"
border string

Window border style. One of 'rounded' (default) | 'single' | 'double' | 'hidden' | 'bold'

Default: "rounded"
Values: "single" "double" "rounded" "hidden" "bold"
animateExplosion boolean

If true, show a seriously epic explosion animation when nuking the working tree.

Default: true
portraitMode string

Whether to stack UI components on top of each other. One of 'auto' (default) | 'always' | 'never'

Default: "auto"
portraitModeAutoMaxWidth integer

In 'auto' mode, portrait mode will be used if the window width is less than or equal to portraitModeAutoMaxWidth and the window height is greater than or equal to portraitModeAutoMinHeight. Unused when portraitMode is not 'auto'.

Default: 84
portraitModeAutoMinHeight integer

In 'auto' mode, portrait mode will be used if the window width is less than or equal to portraitModeAutoMaxWidth and the window height is greater than or equal to portraitModeAutoMinHeight. Unused when portraitMode is not 'auto'.

Default: 46
filterMode string

How things are filtered when typing '/'. One of 'substring' (default) | 'fuzzy'

Default: "substring"
Values: "substring" "fuzzy"
spinner object

Config relating to the spinner.

2 nested properties
frames string[]

The frames of the spinner animation.

Default:
[
  "|",
  "/",
  "-",
  "\\"
]
rate integer

The "speed" of the spinner in milliseconds.

Default: 50
min=1
statusPanelView string

Status panel view. One of 'dashboard' (default) | 'allBranchesLog'

Default: "dashboard"
Values: "dashboard" "allBranchesLog"
switchToFilesAfterStashPop boolean

If true, jump to the Files panel after popping a stash

Default: true
switchToFilesAfterStashApply boolean

If true, jump to the Files panel after applying a stash

Default: true
switchTabsWithPanelJumpKeys boolean

If true, when using the panel jump keys (default 1 through 5) and target panel is already active, go to next tab instead

Default: false
git object

Config relating to git

25 nested properties

Array of pagers. Each entry has the following format:

Value of the --color arg in the git diff command. Some pagers want

this to be set to 'always' and some want it set to 'never'

colorArg: "always"

e.g.

diff-so-fancy

delta --dark --paging=never

ydiff -p cat -s --wrap --width={{columnWidth}}

pager: ""

e.g. 'difft --color=always'

externalDiffCommand: ""

If true, Lazygit will use git's diff.external config for paging.

The advantage over externalDiffCommand is that this can be

configured per file type in .gitattributes; see

https://git-scm.com/docs/gitattributes#_defining_an_external_diff_driver.

useExternalDiffGitConfig: false

See https://github.com/jesseduffield/lazygit/blob/master/docs/Custom_Pagers.md for more information.

commit object

Config relating to committing

3 nested properties
signOff boolean

If true, pass '--signoff' flag when committing

Default: false
autoWrapCommitMessage boolean

Automatic WYSIWYG wrapping of the commit message as you type

Default: true
autoWrapWidth integer

If autoWrapCommitMessage is true, the width to wrap to

Default: 72
merging object

Config relating to merging

3 nested properties
manualCommit boolean

If true, run merges in a subprocess so that if a commit message is required, Lazygit will not hang Only applicable to unix users.

Default: false
args string

Extra args passed to git merge, e.g. --no-ff

Examples: "--no-ff"
squashMergeMessage string

The commit message to use for a squash merge commit. Can contain "{{selectedRef}}" and "{{currentBranch}}" placeholders.

Default: "Squash merge {{selectedRef}} into {{currentBranch}}"
mainBranches string[]

list of branches that are considered 'main' branches, used when displaying commits

Default:
[
  "master",
  "main"
]
uniqueItems=true
skipHookPrefix string

Prefix to use when skipping hooks. E.g. if set to 'WIP', then pre-commit hooks will be skipped when the commit message starts with 'WIP'

Default: "WIP"
autoFetch boolean

If true, periodically fetch from remote

Default: true
autoRefresh boolean

If true, periodically refresh files and submodules

Default: true
autoForwardBranches string

If not "none", lazygit will automatically fast-forward local branches to match their upstream after fetching. Applies to branches that are not the currently checked out branch, and only to those that are strictly behind their upstream (as opposed to diverged). Possible values: 'none' | 'onlyMainBranches' | 'allBranches'

Default: "onlyMainBranches"
Values: "none" "onlyMainBranches" "allBranches"
fetchAll boolean

If true, pass the --all arg to git fetch

Default: true
autoStageResolvedConflicts boolean

If true, lazygit will automatically stage files that used to have merge conflicts but no longer do; and it will also ask you if you want to continue a merge or rebase if you've resolved all conflicts. If false, it won't do either of these things.

Default: true
branchLogCmd string

Command used when displaying the current branch git log in the main window

Default: "git log --graph --color=always --abbrev-commit --decorate --date=relative --pretty=medium {{branchName}} --"
allBranchesLogCmds string[]

Commands used to display git log of all branches in the main window, they will be cycled in order of appearance (array of strings)

Default:
[
  "git log --graph --all --color=always --abbrev-commit --decorate --date=relative  --pretty=medium"
]
ignoreWhitespaceInDiffView boolean

If true, git diffs are rendered with the --ignore-all-space flag, which ignores whitespace changes. Can be toggled from within Lazygit with <c-w>.

Default: false
diffContextSize integer

The number of lines of context to show around each diff hunk. Can be changed from within Lazygit with the { and } keys.

Default: 3
renameSimilarityThreshold integer

The threshold for considering a file to be renamed, in percent. Can be changed from within Lazygit with the ( and ) keys.

Default: 50
min=0max=100
overrideGpg boolean

If true, do not spawn a separate process when using GPG

Default: false
disableForcePushing boolean

If true, do not allow force pushes

Default: false
parseEmoji boolean

If true, parse emoji strings in commit messages e.g. render :rocket: as 🚀 (This should really be under 'gui', not 'git')

Default: false
log object

Config for showing the log in the commits view

3 nested properties
order string

One of: 'date-order' | 'author-date-order' | 'topo-order' | 'default' 'topo-order' makes it easier to read the git log graph, but commits may not appear chronologically. See https://git-scm.com/docs/

Can be changed from within Lazygit with Log menu -> Commit sort order (<c-l> in the commits window by default).

Default: "topo-order"
Values: "date-order" "author-date-order" "topo-order" "default"
showGraph string

This determines whether the git graph is rendered in the commits panel One of 'always' | 'never' | 'when-maximised'

Can be toggled from within lazygit with Log menu -> Show git graph (<c-l> in the commits window by default).

Default: "always"
Values: "always" "never" "when-maximised"
showWholeGraph boolean

displays the whole git graph by default in the commits view (equivalent to passing the --all argument to git log)

Default: false
localBranchSortOrder string

How branches are sorted in the local branches view. One of: 'date' (default) | 'recency' | 'alphabetical' Can be changed from within Lazygit with the Sort Order menu (s) in the branches panel.

Default: "date"
Values: "date" "recency" "alphabetical"
remoteBranchSortOrder string

How branches are sorted in the remote branches view. One of: 'date' (default) | 'alphabetical' Can be changed from within Lazygit with the Sort Order menu (s) in the remote branches panel.

Default: "date"
Values: "date" "alphabetical"
truncateCopiedCommitHashesTo integer

When copying commit hashes to the clipboard, truncate them to this length. Set to 40 to disable truncation.

Default: 12
update object

Periodic update checks

2 nested properties
method string

One of: 'prompt' (default) | 'background' | 'never'

Default: "prompt"
Values: "prompt" "background" "never"
days integer

Period in days between update checks

Default: 14
min=0
refresher object

Background refreshes

2 nested properties
refreshInterval integer

File/submodule refresh interval in seconds. Auto-refresh can be disabled via option 'git.autoRefresh'.

Default: 10
min=0
fetchInterval integer

Re-fetch interval in seconds. Auto-fetch can be disabled via option 'git.autoFetch'.

Default: 60
min=0
confirmOnQuit boolean

If true, show a confirmation popup before quitting Lazygit

Default: false
quitOnTopLevelReturn boolean

If true, exit Lazygit when the user presses escape in a context where there is nothing to cancel/close

Default: false
os object

Config relating to things outside of Lazygit like how files are opened, copying to clipboard, etc

11 nested properties
edit string

Command for editing a file. Should contain "{{filename}}".

editAtLine string

Command for editing a file at a given line number. Should contain "{{filename}}", and may optionally contain "{{line}}".

editAtLineAndWait string

Same as EditAtLine, except that the command needs to wait until the window is closed.

editInTerminal boolean

Whether lazygit suspends until an edit process returns

openDirInEditor string

For opening a directory in an editor

editPreset string

A built-in preset that sets all of the above settings. Supported presets are defined in the getPreset function in editor_presets.go.

Examples: "vim", "nvim", "emacs", "nano", "vscode", "sublime", "kakoune", "helix", "xcode", "zed", "acme"
open string

Command for opening a file, as if the file is double-clicked. Should contain "{{filename}}", but doesn't support "{{line}}".

openLink string

Command for opening a link. Should contain "{{link}}".

copyToClipboardCmd string
readFromClipboardCmd string
shellFunctionsFile string

A shell startup file containing shell aliases or shell functions. This will be sourced before running any shell commands, so that shell functions are available in the : command prompt or even in custom commands. See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#using-aliases-or-functions-in-shell-commands

disableStartupPopups boolean

If true, don't display introductory popups upon opening Lazygit.

Default: false
customCommands CustomCommand[]

User-configured commands that can be invoked from within Lazygit See https://github.com/jesseduffield/lazygit/blob/master/docs/Custom_Command_Keybindings.md

uniqueItems=true
notARepository string

What to do when opening Lazygit outside of a git repo.

  • 'prompt': (default) ask whether to initialize a new repo or open in the most recent repo
  • 'create': initialize a new repo
  • 'skip': open most recent repo
  • 'quit': exit Lazygit
Default: "prompt"
Values: "prompt" "create" "skip" "quit"
promptToReturnFromSubprocess boolean

If true, display a confirmation when subprocess terminates. This allows you to view the output of the subprocess before returning to Lazygit.

Default: true
keybinding object

Keybindings

12 nested properties
universal object
77 nested properties
quit string
Default: "q"
quit-alt1 string
Default: "<c-c>"
suspendApp string
Default: "<c-z>"
return string
Default: "<esc>"
quitWithoutChangingDirectory string
Default: "Q"
togglePanel string
Default: "<tab>"
prevItem string
Default: "<up>"
nextItem string
Default: "<down>"
prevItem-alt string
Default: "k"
nextItem-alt string
Default: "j"
prevPage string
Default: ","
nextPage string
Default: "."
scrollLeft string
Default: "H"
scrollRight string
Default: "L"
gotoTop string
Default: "<"
gotoBottom string
Default: ">"
gotoTop-alt string
Default: "<home>"
gotoBottom-alt string
Default: "<end>"
toggleRangeSelect string
Default: "v"
rangeSelectDown string
Default: "<s-down>"
rangeSelectUp string
Default: "<s-up>"
prevBlock string
Default: "<left>"
nextBlock string
Default: "<right>"
prevBlock-alt string
Default: "h"
nextBlock-alt string
Default: "l"
nextBlock-alt2 string
Default: "<tab>"
prevBlock-alt2 string
Default: "<backtab>"
jumpToBlock string[]
Default:
[
  "1",
  "2",
  "3",
  "4",
  "5"
]
focusMainView string
Default: "0"
nextMatch string
Default: "n"
prevMatch string
Default: "N"
startSearch string
Default: "/"
optionMenu string
Default: "<disabled>"
optionMenu-alt1 string
Default: "?"
select string
Default: "<space>"
goInto string
Default: "<enter>"
confirm string
Default: "<enter>"
confirmMenu string
Default: "<enter>"
confirmSuggestion string
Default: "<enter>"
confirmInEditor string
Default: "<a-enter>"
confirmInEditor-alt string
Default: "<c-s>"
remove string
Default: "d"
new string
Default: "n"
edit string
Default: "e"
openFile string
Default: "o"
scrollUpMain string
Default: "<pgup>"
scrollDownMain string
Default: "<pgdown>"
scrollUpMain-alt1 string
Default: "K"
scrollDownMain-alt1 string
Default: "J"
scrollUpMain-alt2 string
Default: "<c-u>"
scrollDownMain-alt2 string
Default: "<c-d>"
executeShellCommand string
Default: ":"
createRebaseOptionsMenu string
Default: "m"
pushFiles string

'Files' appended for legacy reasons

Default: "P"
pullFiles string

'Files' appended for legacy reasons

Default: "p"
refresh string
Default: "R"
createPatchOptionsMenu string
Default: "<c-p>"
nextTab string
Default: "]"
prevTab string
Default: "["
nextScreenMode string
Default: "+"
prevScreenMode string
Default: "_"
cyclePagers string
Default: "|"
undo string
Default: "z"
redo string
Default: "Z"
filteringMenu string
Default: "<c-s>"
diffingMenu string
Default: "W"
diffingMenu-alt string
Default: "<c-e>"
copyToClipboard string
Default: "<c-o>"
openRecentRepos string
Default: "<c-r>"
submitEditorText string
Default: "<enter>"
extrasMenu string
Default: "@"
toggleWhitespaceInDiffView string
Default: "<c-w>"
increaseContextInDiffView string
Default: "}"
decreaseContextInDiffView string
Default: "{"
increaseRenameSimilarityThreshold string
Default: ")"
decreaseRenameSimilarityThreshold string
Default: "("
openDiffTool string
Default: "<c-t>"
status object
4 nested properties
checkForUpdate string
Default: "u"
recentRepos string
Default: "<enter>"
allBranchesLogGraph string
Default: "a"
allBranchesLogGraphReverse string
Default: "A"
files object
19 nested properties
commitChanges string
Default: "c"
commitChangesWithoutHook string
Default: "w"
amendLastCommit string
Default: "A"
commitChangesWithEditor string
Default: "C"
findBaseCommitForFixup string
Default: "<c-f>"
confirmDiscard string
Default: "x"
ignoreFile string
Default: "i"
refreshFiles string
Default: "r"
stashAllChanges string
Default: "s"
viewStashOptions string
Default: "S"
toggleStagedAll string
Default: "a"
viewResetOptions string
Default: "D"
fetch string
Default: "f"
toggleTreeView string
Default: "`"
openMergeOptions string
Default: "M"
openStatusFilter string
Default: "<c-b>"
copyFileInfoToClipboard string
Default: "y"
collapseAll string
Default: "-"
expandAll string
Default: "="
branches object
19 nested properties
createPullRequest string
Default: "o"
viewPullRequestOptions string
Default: "O"
openPullRequestInBrowser string
Default: "G"
copyPullRequestURL string
Default: "<c-y>"
checkoutBranchByName string
Default: "c"
forceCheckoutBranch string
Default: "F"
checkoutPreviousBranch string
Default: "-"
rebaseBranch string
Default: "r"
renameBranch string
Default: "R"
mergeIntoCurrentBranch string
Default: "M"
moveCommitsToNewBranch string
Default: "N"
viewGitFlowOptions string
Default: "i"
fastForward string
Default: "f"
createTag string
Default: "T"
pushTag string
Default: "P"
setUpstream string
Default: "u"
fetchRemote string
Default: "f"
addForkRemote string
Default: "F"
sortOrder string
Default: "s"
worktrees object
1 nested properties
viewWorktreeOptions string
Default: "w"
commits object
27 nested properties
squashDown string
Default: "s"
renameCommit string
Default: "r"
renameCommitWithEditor string
Default: "R"
viewResetOptions string
Default: "g"
markCommitAsFixup string
Default: "f"
setFixupMessage string
Default: "c"
createFixupCommit string
Default: "F"
squashAboveCommits string
Default: "S"
moveDownCommit string
Default: "<c-j>"
moveUpCommit string
Default: "<c-k>"
amendToCommit string
Default: "A"
resetCommitAuthor string
Default: "a"
pickCommit string
Default: "p"
revertCommit string
Default: "t"
cherryPickCopy string
Default: "C"
pasteCommits string
Default: "V"
markCommitAsBaseForRebase string
Default: "B"
tagCommit string
Default: "T"
checkoutCommit string
Default: "<space>"
resetCherryPick string
Default: "<c-R>"
copyCommitAttributeToClipboard string
Default: "y"
openLogMenu string
Default: "<c-l>"
openInBrowser string
Default: "o"
openPullRequestInBrowser string
Default: "G"
viewBisectOptions string
Default: "b"
startInteractiveRebase string
Default: "i"
selectCommitsOfCurrentBranch string
Default: "*"
amendAttribute object
3 nested properties
resetAuthor string
Default: "a"
setAuthor string
Default: "A"
addCoAuthor string
Default: "c"
stash object
2 nested properties
popStash string
Default: "g"
renameStash string
Default: "r"
commitFiles object
1 nested properties
checkoutCommitFile string
Default: "c"
main object
3 nested properties
toggleSelectHunk string
Default: "a"
pickBothHunks string
Default: "b"
editSelectHunk string
Default: "E"
submodules object
3 nested properties
init string
Default: "i"
update string
Default: "u"
bulkMenu string
Default: "b"
commitMessage object
1 nested properties
commitMenu string
Default: "<c-o>"