问题
I've just tried to install Flutter on Linux and when I try to run a flutter command (flutter doctor), I'm getting
Error: Unable to find git in your PATH.
Anyone who knows how to solve this?
回答1:
Install it using following command.
sudo apt-get install git
回答2:
Add
C:\Program Files\Git\bin\git.exe;C:\Program Files\Git\cmd;C:\Windows\System32
to your PATH variable
Do not create new variable for git but add them as I did one after another separating them by ;
回答3:
[ASSUMING GIT IS INSTALLED CORRECTLY] I have documented the bug at "https://github.com/flutter/flutter/issues/39785", it's a simple change to the batch file.
回答4:
I had the same problem on Windows 10. I've tried evertyhing but running cmd as Administrator solved my problem. This may be helpful for others.
来源:https://stackoverflow.com/questions/51263438/how-to-solve-unable-to-find-git-in-your-path-on-flutter