Aalap Patel
Aalap Patel

Reputation: 2076

git command not recognisable in android studio terminal

I have just downloaded android studio as well as git.exe also. I have updated path in version control-->>git also with appropriate git.exe path and tested and it is successful. Now from terminal when I type git clone http://my projectlink, it says "'git' is not recognized as an internal or external command, operable program or batch file."

Am I missing anything else?

Upvotes: 21

Views: 14975

Answers (4)

Shubhanshu Kashiva
Shubhanshu Kashiva

Reputation: 192

I've found that restarting your IDE(Android Studio, VS Code or any other) or device can often fix minor issues. Try restarting your IDE or device and see if that resolves the issue.

In my case, restarting my device fixed the issue I was having. I recommend giving it a try.

Upvotes: 1

M. Arslan Hafeez
M. Arslan Hafeez

Reputation: 131

  1. Add path of installation directory of Git in environmental variables. In my case I have added "C:\Program Files\Git\bin" this and my problem is solved.
  2. Check the box of adding environmental variable during the installation of git.

Upvotes: 0

Shailendra Madda
Shailendra Madda

Reputation: 21561

I found the simple solution here.

Go to File--> Settings-->Terminal-->Shell Path --> Browse--> path of git bash.exe-->Apply-->OK

enter image description here

Now Restart the Android studio to effect changes.

OR

You could also just start a new session

That's it. Now you can use terminal as git bash..

Upvotes: 45

Karan Kalsi
Karan Kalsi

Reputation: 819

You need to set Environment Variable path for your git.exe.

Right-Click on My Computer Click Advanced System Settings Click Environment Variables

Then under System Variables look for the path variable and click edit Add the path of git’s bin to the end of the string.

Upvotes: 2

Related Questions