GitLens requires a newer version of Git (>= 2.7.2) than is currently installed (v12.0.0). Please install a more recent version of Git.
I have the latest version of Github desktop (2.2.2), however GitLens still requests a newer one.
VS Code:
Version: 1.39.2 (user setup)
Commit: 6ab598523be7a800d7f3eb4d92d7ab9a66069390
Date: 2019-10-15T15:35:18.241Z
Electron: 4.2.10
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Windows_NT x64 10.0.18362

@ensignn GitLens requires a newer version of Git, not GitHub Desktop. But from that message something seems very strange -- as it says you have v12.0.0 of Git, which AFAIK doesn't exist.
Please enable output channel logging by setting "gitlens.outputLevel": "debug" in your settings. This will enable logging to the GitLens channel in the Output pane. Once enabled, please reproduce the issue and attach the log from the GitLens channel.
I had a similar issue on my Mac portable. In my case the error was:
Gitlens requires a newer version of Git (>=2.7.2) than is currently installed (2.6.4 (Apple Git-63)). Please install a more recent version of Git.
Typing git --version the terminal responded with:
git version 2.23.0
That version was installed from https://git-scm.com/.
Typing which git showed me the path to that version of Git. In my case it was located at:
/usr/local/bin/git
To fix the issue with Gitlens, open the settings in Visual Studio Code:
Command+Shift+PsettingsPreferences: Open Settings (JSON).Add the following lines to this file and save:
"git.enabled": true,
"git.path": "/usr/local/bin/git"
_(NOTE: of-course replace the git.path value with whatever value you got back in the terminal if it's different from what I have.)_
I'm running into this issue as well.
It seems that GitLens for whatever reason is ignoring the git.path setting, as well as ignoring the path environment variable.

The screenshot shows that my Git versions is 2.24.0.2 (at that path), and doing a git --version so it reads from the (Windows) environment variable reads it fine. I've also added that path to the VSC settings.
Since the screenshot was taken, and reading this thread, I also tried @sjee 's suggestion, and added "git.enabled": true, to the settings, as well as doing a which git which showed me /cmd/git; still get the same message every time I restart VSC....
So then I added to the settings "gitlens.outputLevel": "debug" and it shows this:
[2019-11-13 15:34:52:280] [1] GitService.initialize
[2019-11-13 15:34:52:280] [2] GitService.getBuiltInGitApi
[2019-11-13 15:34:52:535] [2] GitService.getBuiltInGitApi completed • 254 ms
[2019-11-13 15:34:52:843] Git found: 2.7.1.windows.2 @ C:\Program Files\Git\cmd\git.exe • 307 ms
[2019-11-13 15:34:52:843] [1] GitService.initialize completed • 562 ms
[2019-11-13 15:34:52:844] Starting repository search in 0 folders
[2019-11-13 15:34:52:845] [3] GitUri.fromUri — e=Uri(vscode-userdata:/c:/Users/kacey/AppData/Roaming/Code/User/settings.json)
[2019-11-13 15:34:52:845] [4] LineAnnotationController.resume
[2019-11-13 15:34:52:846] [4] LineAnnotationController.resume completed • 0 ms
[2019-11-13 15:34:52:846] [5] LineAnnotationController.refresh
[2019-11-13 15:34:52:846] [6] LineAnnotationController.clear
[2019-11-13 15:34:52:846] [6] LineAnnotationController.clear completed • 0 ms
[2019-11-13 15:34:52:855] ShowMessage(error, 'GitLens requires a newer version of Git (>= 2.7.2) than is currently installed (2.7.1.windows.2). Please install a more recent version of Git.', suppressGitVersionWarning, [object Object])
[2019-11-13 15:34:52:857] GitLens (v10.1.2) activated • 913 ms
[2019-11-13 15:34:52:857] [3] GitUri.fromUri returned GitUri(vscode-userdata:/c:/Users/kacey/AppData/Roaming/Code/User/settings.json) • 12 ms
[2019-11-13 15:34:52:857] [7] GitService.getRepository — e=GitUri(vscode-userdata:/c:/Users/kacey/AppData/Roaming/Code/User/settings.json)
[2019-11-13 15:34:52:858] [5] LineAnnotationController.refresh completed • Skipped because there is no valid editor or no valid lines • 11 ms
[2019-11-13 15:34:52:859] [8] LineAnnotationController.onActiveLinesChanged — e=editor=vscode-userdata:/c:/Users/kacey/AppData/Roaming/Code/User/settings.json, lines=undefined, pending=true, reason=editor
[2019-11-13 15:34:52:860] [9] LineAnnotationController.clear
[2019-11-13 15:34:52:860] [9] LineAnnotationController.clear completed • 0 ms
[2019-11-13 15:34:52:860] [8] LineAnnotationController.onActiveLinesChanged completed • 0 ms
[2019-11-13 15:34:53:098] [7] GitService.getRepository returned undefined • 240 ms
[2019-11-13 15:34:53:099] [a] GitService.isTracked returned false • 0 ms — e=GitUri(vscode-userdata:/c:/Users/kacey/AppData/Roaming/Code/User/settings.json)
[2019-11-13 15:34:53:111] [b] LineAnnotationController.onActiveLinesChanged — e=editor=vscode-userdata:/c:/Users/kacey/AppData/Roaming/Code/User/settings.json, lines=undefined, pending=false, reason=editor
[2019-11-13 15:34:53:111] [c] LineAnnotationController.clear
[2019-11-13 15:34:53:111] [c] LineAnnotationController.clear completed • 0 ms
[2019-11-13 15:34:53:111] [b] LineAnnotationController.onActiveLinesChanged completed • 0 ms
[2019-11-13 15:36:23:507] [d] LineAnnotationController.onActiveLinesChanged — e=editor=undefined, lines=undefined, pending=false, reason=editor
[2019-11-13 15:36:23:507] [e] LineAnnotationController.clear
[2019-11-13 15:36:23:507] [e] LineAnnotationController.clear completed • 0 ms
[2019-11-13 15:36:23:507] [d] LineAnnotationController.onActiveLinesChanged completed • 0 ms
[2019-11-13 15:36:26:018] ShowMessage(error, 'GitLens requires a newer version of Git (>= 2.7.2) than is currently installed (2.7.1.windows.2). Please install a more recent version of Git.', suppressGitVersionWarning, [object Object]) returned undefined
As you can see, it's still trying to read from C:\Program Files\Git\cmd\git.exe and I have no idea why since the VSC settings specifically state to use a different one, as well as does the environment variable?
I do realize I could move my git installation to that C:\Program Files\Git folder, but that seems like just a workaround to a bug, and I also want to keep my Git where it's at.
Update:
I uninstalled the version of Git For Windows that was in C:\Program Files\Git\ and now it reads from the settings file properly. Very strange?
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
Analysis:
I had a similar issue on my Mac portable. In my case the error was:
Typing
git --versionthe terminal responded with:That version was installed from https://git-scm.com/.
Typing
which gitshowed me the path to that version of Git. In my case it was located at:Solution:
To fix the issue with Gitlens, open the settings in Visual Studio Code:
Command+Shift+PsettingsPreferences: Open Settings (JSON).Add the following lines to this file and save:
_(NOTE: of-course replace the git.path value with whatever value you got back in the terminal if it's different from what I have.)_