Whenever I run the flutter or dart commands on the VS code Terminal I get "Error: Unable to find Git in your PATH".
I’ve already tried to the solutions from other suggestions like making sure the PATH contains:
C:WindowsSystem32
C:WindowsSystem32WindowsPowerShellv1.0
C:Program FilesGitbin and/or C:Program FilesGitbingit.exe
C:Program FilesGitcmd
C:srcflutterbin
this problem after installing the Flutter 3.7.12 version.
flutter commands work in cmd but not work in VS code Terminal.
I reinstalled Git and tried it on the command line and Git works.
2
Answers
If you have installed git through other mediums other than what is said by vs code docs, you need to configure the git path in the environment of vs code.
To do so, go to File > Preferences > Settings.
This will open a JSON like file.
Add these lines to the file:
Also, remember to restart your vscode instance.
run this cmd will solve issue
git config –global –add safe.directory ‘*’