{"record":{"id":"0b93162e950dd10d","repo":"jesseduffield/lazygit","slug":"this-does-not-seem-to-be-a-git-flow-branch","errorCode":null,"errorMessage":"This does not seem to be a git flow branch","messagePattern":"This does not seem to be a git flow branch","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"pkg/commands/git_commands/flow.go","lineNumber":31,"sourceCode":"\nfunc NewFlowCommands(\n\tgitCommon *GitCommon,\n) *FlowCommands {\n\treturn &FlowCommands{\n\t\tGitCommon: gitCommon,\n\t}\n}\n\nfunc (self *FlowCommands) GitFlowEnabled() bool {\n\treturn len(self.config.GetGitFlowPrefixMap()) > 0\n}\n\nfunc (self *FlowCommands) FinishCmdObj(branchName string) (*oscommands.CmdObj, error) {\n\tprefixMap := self.config.GetGitFlowPrefixMap()\n\n\tprefixPart, suffix, ok := strings.Cut(branchName, \"/\")\n\tif !ok || prefixPart == \"\" || suffix == \"\" {\n\t\treturn nil, errors.New(self.Tr.NotAGitFlowBranch)\n\t}\n\tprefix := prefixPart + \"/\"\n\n\tbranchType := prefixMap[prefix]\n\tif branchType == \"\" {\n\t\treturn nil, errors.New(self.Tr.NotAGitFlowBranch)\n\t}\n\n\tcmdArgs := NewGitCmd(\"flow\").Arg(branchType, \"finish\", suffix).ToArgv()\n\n\treturn self.cmd.New(cmdArgs), nil\n}\n\nfunc (self *FlowCommands) StartCmdObj(branchType string, name string) *oscommands.CmdObj {\n\tcmdArgs := NewGitCmd(\"flow\").Arg(branchType, \"start\", name).ToArgv()\n\n\treturn self.cmd.New(cmdArgs)\n}","sourceCodeStart":13,"sourceCodeEnd":49,"githubUrl":"https://github.com/jesseduffield/lazygit/blob/c477a2959b229fbf3284be0d4d2904ab61ec3c94/pkg/commands/git_commands/flow.go#L13-L49","documentation":"FinishCmdObj (git flow finish) errors when the branch name contains no '/' separator, or the part before '/' is empty. The git-flow branch type is derived from the prefix before the slash, so a branch like 'main' or '/foo' has no flow type at all.","triggerScenarios":"Invoking the finish action on a branch without a slash (e.g. 'master', 'main'); a branch literally named '/suffix' or 'prefix/' where one side of the Cut is empty.","commonSituations":"Keybinding/menu mapped to git-flow finish hit while a non-flow branch is selected; stale selection after switching branches; muscle-memory on projects that don't use git-flow.","solutions":["Only run finish on branches named <type>/<name>, e.g. feature/x, release/1.0","If you meant to delete/merge a normal branch, use the branch panel's delete/merge actions instead of git flow finish","Initialize git flow in the repo (`git flow init`) so naming conventions are established"],"exampleFix":"# before\ngit flow finish on branch 'main'  -> error\n\n# after\n# switch to a flow branch first\ngit checkout feature/my-feature   then run finish","handlingStrategy":"validation","validationCode":"prefixPart, suffix, ok := strings.Cut(branchName, \"/\")\nif !ok || prefixPart == \"\" || suffix == \"\" {\n    return fmt.Errorf(\"branch %q has no git-flow <type>/<name> shape\", branchName)\n}\n// safe to call FinishCmdObj","typeGuard":null,"tryCatchPattern":"Catch by checking Tr.NotAGitFlowBranch equality at the call site and degrade gracefully: disable the finish action for branches without a slash instead of showing the raw error.","preventionTips":["Gate the git-flow finish keybinding on branch shape in the controller","Adopt <type>/<name> naming in repos where git flow is used","Run `git flow init` so conventions are explicit"],"tags":["git-flow","branch-naming","validation"],"backgroundTag":null,"analyzedSha":"c477a2959b229fbf3284be0d4d2904ab61ec3c94","analyzedAt":"2026-08-15T08:34:32.451Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}