Document mainBranches and the disambiguation prompt

This commit is contained in:
Stefan Haller 2026-05-21 21:43:53 +02:00
parent df138a4c72
commit 2efaa38124
4 changed files with 6 additions and 4 deletions

View file

@ -419,7 +419,9 @@ git:
squashMergeMessage: Squash merge {{selectedRef}} into {{currentBranch}}
# list of branches that are considered 'main' branches, used when displaying
# commits
# commits and for determining each branch's base. Lazygit prompts when a branch
# could be based on more than one of these (typical when one is regularly merged
# into another).
mainBranches:
- master
- main

View file

@ -749,7 +749,7 @@ git:
# The commit message to use for a squash merge commit. Can contain "{{selectedRef}}" and "{{currentBranch}}" placeholders.
squashMergeMessage: Squash merge {{selectedRef}} into {{currentBranch}}
# list of branches that are considered 'main' branches, used when displaying commits
# list of branches that are considered 'main' branches, used when displaying commits and for determining each branch's base. Lazygit prompts when a branch could be based on more than one of these (typical when one is regularly merged into another).
mainBranches:
- master
- main

View file

@ -304,7 +304,7 @@ type GitConfig struct {
Commit CommitConfig `yaml:"commit"`
// Config relating to merging
Merging MergingConfig `yaml:"merging"`
// list of branches that are considered 'main' branches, used when displaying commits
// list of branches that are considered 'main' branches, used when displaying commits and for determining each branch's base. Lazygit prompts when a branch could be based on more than one of these (typical when one is regularly merged into another).
MainBranches []string `yaml:"mainBranches" jsonschema:"uniqueItems=true"`
// 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'
SkipHookPrefix string `yaml:"skipHookPrefix"`

View file

@ -337,7 +337,7 @@
},
"type": "array",
"uniqueItems": true,
"description": "list of branches that are considered 'main' branches, used when displaying commits",
"description": "list of branches that are considered 'main' branches, used when displaying commits and for determining each branch's base. Lazygit prompts when a branch could be based on more than one of these (typical when one is regularly merged into another).",
"default": [
"master",
"main"