VS Code error - No source control providers registered

I opened a git repo by VS Code, but it shows No source control providers registered. One possible reason is that VS Code couldn’t find the executable git command, so we can set the executable path of git in settings. Open File -> Preferences -> Settings, then find the Git: Path setting, click Edit in settings.json, and add "git.path": "full-path-to-git" to settings.json.

Reference: