IDEA *.is registered as a Git root, but no Git repositories were found there.

时间:2024-03-28 13:37:49

报错详情:

The directory C:\文件\ideaWorkSpace\seckill-master is registered as a Git root, but no Git repositories were found there.

IDEA *.is registered as a Git root, but no Git repositories were found there.

点击右下角弹出窗口中的Configure 。这会在version contral (版本控制)选项卡上自动打开一个窗口

也可以通过File->Settings进行访问。

IDEA *.is registered as a Git root, but no Git repositories were found there.

另外的解决办法:

.idea存储库中有一个文件夹不应该在那里。里面是与vcs相关的文件,可能包含一个不在你的电脑上的路径。

确保.git在PC上的项目中有一个文件夹。如果不是,那么如果需要启用vcs工具,则必须正确克隆该项目。这里有一个关于如何做到这一点的链接:Git基础知识,搜索克隆现有的存储库

然后,您需要关闭Android Studio,删除该.idea文件夹,然后再次打开Android Studio。它会重新创建.idea文件夹和问题应该解决。

参考原文:https://my.oschina.net/zjllovecode/blog/1591722
建议学习: https://git-scm.com/book/en/v2/Git-Basics-Getting-a-Git-Repository