{"record":{"id":"11a7e07dc24618c4","repo":"jesseduffield/lazygit","slug":"git-version-must-be-at-least-s-please-upgrade-yo","errorCode":null,"errorMessage":"Git version must be at least %s. Please upgrade your git version.","messagePattern":"Git version must be at least (.+?)\\. Please upgrade your git version\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"pkg/app/app.go","lineNumber":153,"sourceCode":"\t}\n\n\tapp.Gui, err = gui.NewGui(common, config, gitVersion, updater, showRecentRepos, dirName, test)\n\tif err != nil {\n\t\treturn app, err\n\t}\n\treturn app, nil\n}\n\nconst minGitVersionStr = \"2.32.0\"\n\nfunc minGitVersionErrorMessage(tr *i18n.TranslationSet) string {\n\treturn fmt.Sprintf(tr.MinGitVersionError, minGitVersionStr)\n}\n\nfunc (app *App) validateGitVersion() (*git_commands.GitVersion, error) {\n\tversion, err := git_commands.GetGitVersion(app.OSCommand)\n\t// if we get an error anywhere here we'll show the same status\n\tminVersionError := errors.New(minGitVersionErrorMessage(app.Tr))\n\tif err != nil {\n\t\treturn nil, minVersionError\n\t}\n\n\tminRequiredVersion, _ := git_commands.ParseGitVersion(minGitVersionStr)\n\tif version.IsOlderThanVersion(minRequiredVersion) {\n\t\treturn nil, minVersionError\n\t}\n\n\treturn version, nil\n}\n\nfunc isDirectoryAGitRepository(dir string) (bool, error) {\n\tinfo, err := os.Stat(filepath.Join(dir, \".git\"))\n\treturn info != nil, err\n}\n\nfunc openRecentRepo(app *App) bool {","sourceCodeStart":135,"sourceCodeEnd":171,"githubUrl":"https://github.com/jesseduffield/lazygit/blob/c477a2959b229fbf3284be0d4d2904ab61ec3c94/pkg/app/app.go#L135-L171","documentation":"Thrown by App.validateGitVersion at lazygit startup: the detected git version is older than the hard minimum 2.32.0, or the version could not be detected at all (any error from git_commands.GetGitVersion is collapsed into the same message). Lazygit requires 2.32+ because it relies on features such as the sequencer/todo behaviors introduced around that release.","triggerScenarios":"Running lazygit with git < 2.32.0 on PATH; having a shim/wrapper named git that prints non-version output so parsing fails; a broken git install where `git --version` errors; a container/CI image shipping an old git (e.g. Debian buster, old Alpine).","commonSituations":"Old LTS Linux distros, minimal Docker images, macOS with Xcode CommandLineTools git shadowing a Homebrew git, Windows where git is not on PATH at all (GetGitVersion errors are reported the same way).","solutions":["Upgrade git to >= 2.32.0 (e.g. `brew install git`, apt/backport, or use a newer base image)","Verify `git --version` in the same shell/environment lazygit runs in and that it resolves to the binary you expect (`which git`)","If a wrapper script intercepts git, make it pass through `--version` output unchanged or remove it from PATH for lazygit"],"exampleFix":"# before\n$ lazygit\nGit version must be at least 2.32.0. Please upgrade your git version.\n\n# after\n$ brew install git   # or: apt install git / use a newer image\n$ git --version\ngit version 2.45.1\n$ lazygit","handlingStrategy":"validation","validationCode":"out, err := exec.Command(\"git\", \"--version\").Output()\nif err != nil {\n    // git missing/broken: fail before launching lazygit\n    log.Fatal(\"git not usable: \", err)\n}\nv, _ := git_commands.ParseGitVersion(strings.TrimSpace(string(out)))\nmin, _ := git_commands.ParseGitVersion(\"2.32.0\")\nif v.IsOlderThanVersion(min) {\n    log.Fatalf(\"git >= 2.32.0 required, found %s\", v)\n}","typeGuard":null,"tryCatchPattern":"When embedding lazygit's App setup, treat validateGitVersion's error as fatal and surface it to the user with an upgrade instruction rather than retrying — version detection failure and an old version are indistinguishable by design.","preventionTips":["Pin git >= 2.32 in Dockerfiles and CI images","In launch scripts, check `git --version` resolves to the intended binary before starting lazygit","Avoid git wrapper scripts that mangle `--version` output"],"tags":["git","version-check","startup","environment"],"backgroundTag":null,"analyzedSha":"c477a2959b229fbf3284be0d4d2904ab61ec3c94","analyzedAt":"2026-08-15T08:34:32.451Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}