{"record":{"id":"92cfdb13ef749797","repo":"jesseduffield/lazygit","slug":"no-base-commits-found","errorCode":null,"errorMessage":"No base commits found","messagePattern":"No base commits found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"pkg/gui/controllers/helpers/fixup_helper.go","lineNumber":73,"sourceCode":"\tvar hashes []string\n\twarnAboutAddedLines := false\n\n\tif len(deletedLineHunks) > 0 {\n\t\thashes, err = self.blameDeletedLines(deletedLineHunks)\n\t\twarnAboutAddedLines = len(addedLineHunks) > 0\n\t} else if len(addedLineHunks) > 0 {\n\t\thashes, err = self.blameAddedLines(commits, addedLineHunks)\n\t} else {\n\t\treturn errors.New(self.c.Tr.NoChangedFiles)\n\t}\n\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif len(hashes) == 0 {\n\t\t// This should never happen\n\t\treturn errors.New(self.c.Tr.NoBaseCommitsFound)\n\t}\n\n\t// If a commit can't be found, and the last known commit is already merged,\n\t// we know that the commit we're looking for is also merged. Otherwise we\n\t// can't tell.\n\tnotFoundMeansMerged := len(commits) > 0 && commits[len(commits)-1].Status == models.StatusMerged\n\n\tconst (\n\t\tMERGED int = iota\n\t\tNOT_MERGED\n\t\tCANNOT_TELL\n\t)\n\n\t// Group the hashes into buckets by merged status\n\thashGroups := lo.GroupBy(hashes, func(hash string) int {\n\t\tcommit, _, ok := self.findCommit(commits, hash)\n\t\tif ok {\n\t\t\treturn lo.Ternary(commit.Status == models.StatusMerged, MERGED, NOT_MERGED)","sourceCodeStart":55,"sourceCodeEnd":91,"githubUrl":"https://github.com/jesseduffield/lazygit/blob/c477a2959b229fbf3284be0d4d2904ab61ec3c94/pkg/gui/controllers/helpers/fixup_helper.go#L55-L91","documentation":"Returned in two places in FixupHelper when blame succeeded as a process but produced no usable base-commit hashes: (a) after blaming, len(hashes)==0 — marked 'should never happen'; (b) in blameAddedLines when two candidate hashes are found but neither exists in the loaded commit model. The error distinguishes 'blame ran but identified nothing attributable' from the not-in-view and already-on-main cases.","triggerScenarios":"Selecting changed lines whose blame returns boundary commits (root commit '^' pseudo-hash) or hashes from other branches that the current commits model (last 300 commits) does not contain; pathological empty blame output.","commonSituations":"Long-lived branches where the touched line predates the model's commit window; lines introduced by a merge commit itself; shallow clones where history is truncated.","solutions":["Increase the commit window by scrolling/loading more commits in the Commits panel, then retry.","Run 'git log -S' or 'git blame' on the line manually to see which commit actually introduced it.","If the base is a merge or root commit, create a normal commit instead of a fixup."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"// pre-check that candidate hashes are within the loaded model:\nif _, _, ok := findCommit(commits, hash); !ok {\n    // load more history or fall back to manual git commit --fixup\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Load extra commit history before fixup on old files","Unshallow clones (git fetch --unshallow) used with lazygit"],"tags":["git","fixup","blame","history-depth","shallow-clone"],"backgroundTag":null,"analyzedSha":"c477a2959b229fbf3284be0d4d2904ab61ec3c94","analyzedAt":"2026-08-15T08:34:32.451Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}