Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter error:unable to find git path in windows

Tags:

flutter

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???

like image 817
anthony veronica Avatar asked Dec 09 '25 21:12

anthony veronica


1 Answers

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.

like image 172
Denver Shenal Avatar answered Dec 16 '25 22:12

Denver Shenal



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!