jesseduffield/lazygit · warning
You need to install git-flow and enable it in this repo to u
Error message
You need to install git-flow and enable it in this repo to use git-flow features
What it means
Returned by GitFlowController.handleCreateGitFlowMenu when the user opens the git-flow menu but GitFlowEnabled() reports no git-flow configuration in the repository. lazygit does not shell out to the git-flow CLI here; it checks for git-flow sections in .git/config, so the error fires both when the git-flow extension is not installed system-wide and when it is installed but never initialized in this repo.
Source
Thrown at pkg/gui/controllers/git_flow_controller.go:50
}
}
func (self *GitFlowController) GetKeybindings(opts types.KeybindingsOpts) []*types.Binding {
bindings := []*types.Binding{
{
Keys: opts.GetKeys(opts.Config.Branches.ViewGitFlowOptions),
Handler: self.withItem(self.handleCreateGitFlowMenu),
Description: self.c.Tr.GitFlowOptions,
OpensMenu: true,
},
}
return bindings
}
func (self *GitFlowController) handleCreateGitFlowMenu(branch *models.Branch) error {
if !self.c.Git().Flow.GitFlowEnabled() {
return errors.New("You need to install git-flow and enable it in this repo to use git-flow features")
}
startHandler := func(branchType string) func() error {
return func() error {
title := utils.ResolvePlaceholderString(self.c.Tr.NewGitFlowBranchPrompt, map[string]string{"branchType": branchType})
self.c.Prompt(types.PromptOpts{
Title: title,
HandleConfirm: func(name string) error {
self.c.LogAction(self.c.Tr.Actions.GitFlowStart)
return self.c.RunSubprocessAndRefresh(
self.c.Git().Flow.StartCmdObj(branchType, name),
)
},
})
return nil
}View on GitHub (pinned to c477a2959b)
Solutions
- Install git-flow AVH: brew install git-flow-avh / apt install git-flow.
- Run 'git flow init' in the repo (accept defaults or set branch names) to write the [gitflow] sections into .git/config.
- Reopen the git-flow menu in lazygit; GitFlowEnabled() should now pass.
- If you don't intend to use git-flow, simply don't invoke the option; the check is harmless.
Defensive patterns
Strategy: validation
Validate before calling
// guard before opening the menu:
if !git.Flow.GitFlowEnabled() {
// run `git flow init` (non-interactive defaults) or hide the option from the UI
} Prevention
- Run 'git flow init' as part of repo bootstrap scripts
- Hide/disable the git-flow keybinding in keybindings config for repos that don't use it
When it happens
Trigger: Pressing the git-flow options key (default 'i') in the Branches panel on a repo where 'git flow init' has never been run, or where git-flow (AVH edition) is not installed at all. Any later git-flow subcommand from the menu would fail for the same reason, so the menu is blocked up front.
Common situations: Cloning a project that uses git-flow but not running initialization before opening lazygit; fresh machine without the git-flow-avh package; repos deliberately not using git-flow where the keybinding was pressed accidentally.
Related errors
- Git version must be at least %s. Please upgrade your git ver
- Lazygit does not support bare repos.
- unexpected git output
- This does not seem to be a git flow branch
- Must specify a remote if specifying a branch
AI-assisted analysis of jesseduffield/lazygit@c477a2959b (2026-08-15).
Data as JSON: /api/errors/603abbe287429b74.
Report an issue: GitHub.