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.
How can I solve this?
FOR WINDOWS: If you chose visual studio code during git installation and have multiple user accounts on windows then all you need to do is uninstall git and reinstall git choosing vim as the default editor, not visual studio code. You also get a warning when choosing visual studio code during git installation.
You will need git to commit code to a git provider. Plus, if you test app code against the Dev channel there are times when you may clone the flutter git repo and test against that; so ye you do need to have Git installed for your desktop platform.
bat file but not able to run command from Android Studio's terminal. I had this same issue a few days before, The AS terminal wasn't picking env variables from its settings. So what I did was, change the env variables for the system and then close the AS and open it again (NOT Restarted) and it worked.
Install it using following command.
sudo apt-get install git
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 ;
just add C:\Windows\System32
to your system variable PATH.
it works
I also got the same problem because my system didn't had git installed. So I downloaded git from https://git-scm.com/downloads and installed it and just after installing, it worked.
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