Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to solve "Unable to find git in your PATH" on Flutter?

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?

like image 875
Nikolay Shindarov Avatar asked Jul 10 '18 10:07

Nikolay Shindarov


People also ask

How do you solve unable to find git in your path in flutter?

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.

Is git necessary for flutter?

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.

How do you fix flutter is not recognized as an internal or external command operable program or batch file?

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.


4 Answers

Install it using following command.

sudo apt-get install git

like image 53
Marlon Abeykoon Avatar answered Oct 27 '22 09:10

Marlon Abeykoon


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 ;

like image 43
Marwa Eltayeb Avatar answered Oct 27 '22 09:10

Marwa Eltayeb


just add C:\Windows\System32 to your system variable PATH. it works

like image 36
Mt Khalifa Avatar answered Oct 27 '22 09:10

Mt Khalifa


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.

like image 37
Kunal Verma Avatar answered Oct 27 '22 10:10

Kunal Verma