21

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?

2
  • have you tried restart Android Studio application ? Commented Jun 19, 2016 at 15:38
  • it says "fatal: could not create work tree dir 'myproject': Permission denied", i have checked that on the path I dont have this directory so overwritting isnt the problem. Commented Jun 19, 2016 at 16:08

4 Answers 4

45

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

Sign up to request clarification or add additional context in comments.

1 Comment

you dont HAVE to restart Android studio, you could also just start a new session with in my case Ctrl+Shift+T
2

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.

Comments

1

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.

Comments

0
  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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.