无法在 Android Studio 的终端中使用 git

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/32154497/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 11:17:56  来源:igfitidea点击:

Cannot use git in Android Studio's terminal

androidgitterminal

提问by hopdacho

Like my title, I cannot use git in intergrated terminal in Android Studio, although I added Path in Enviroment Variable. Please tell me why?

就像我的标题一样,虽然我在环境变量中添加了路径,但我不能在 Android Studio 的集成终端中使用 git。请告诉我为什么?

Thanks everybody for your help, after restarting windows, I used git command in terminal :D

感谢大家的帮助,重新启动 Windows 后,我在终端中使用了 git 命令:D

回答by weletonne

File>> Settings>> Version Control>> Git>> Click on Testto see if the Test is successful, if not you have to adjust the path which includes git.

File>> Settings>> Version Control>> Git>> 点击Test查看测试是否成功,如果不成功则需要调整包含git的路径。

Probably you need to change also cmd.exe. Go to Settings, search terminal and include the path "C:\Program Files (x86)\Git\bin\sh.exe" --login -i

可能您还需要更改cmd.exe。转到设置,搜索终端并包含路径“C:\Program Files (x86)\Git\bin\sh.exe” --login -i