I've just tried to install Flutter on windows 10. When I try to run a flutter command (flutter doctor), I'm getting
Error: Unable to find git in your PATH.
I have set the path to both git and flutter and tried adding the following to path
C:\Program Files\Git\bin\git.exe;C:\Windows\System32
How can I resolve this???
Go to my flutter installation folder and inside flutter/bin edit the flutter.bat file using a text editor and remove the line (Line 33 in mine) that says
IF EXIST "%mingit_path%" SET PATH=%PATH%;%mingit_path%
The code should look like this on those lines
REM If available, add location of bundled mingit to PATH
SET mingit_path=%FLUTTER_ROOT%\bin\mingit\cmd
REM Test if Git is available on the Host
where /q git || ECHO Error: Unable to find git in your PATH. && EXIT /B 1
Save and Run flutter doctor and everything should work fine.
I guess its something to do with the path variables being confused.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With