Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Registered as a Git root, but no Git repositories were found there

Tags:

git

android

In Android Studio, when I import a project downloaded from link,

I get an error as

"Invalide VCS root mapping" The directory C:\Users\username\Desktop\video_diary-master is registered as a Git root, but no Git repositories were found there.

like image 686
santosh emudhra Avatar asked May 02 '17 07:05

santosh emudhra


People also ask

What is registered as a git root but no Git repositories were found there Pycharm?

In Android Studio, go to File > New > File from Version Control > GitHub. Then log in with your GitHub username and password and select your old project's repository name from the list of your GitHub repos. Continue through the import wizard and you should end up with your old project in Android Studio.

How to fix invalid vcs root mapping in intellij?

For the Invalid VCS root mapping error, you can fix it by deleting the vcs. xml file located in the . idea folder of your project and then Reopen your IDE.

Does not appear in Git repository?

does not a appear to be a git repository” error is triggered when you try to clone, or run other commands, in a directory that is not recognized as a Git repository. The directory or remote file path might not have initialized Git, or the file path you are trying to access as an active repository is incorrect.


2 Answers

In my situation I didn't have to work with git, I just wanted to run the project that I had downloaded and that was prompting me this error

On Android Studio 3.0 I clicked on Configure in the popup window appeared on the bottom right corner

configure popup

This automatically opened a window [accessible as well through File->Settings] on Version Control tab. I selected the first item in the bigger list and I removed it clicking on the red minus sign

enter image description here

After this the error should disappear

like image 184
Antonino Avatar answered Sep 28 '22 17:09

Antonino


There is a .idea folder within the repository which shouldn't be there. Inside it are vcs related files which might contain a path not on your PC.

Make sure there is a .git folder within the project fold er on your PC. If not then you'll have to clone the project properly if you need the vcs tools enabled. Here's a link on how to do that: Git Basics, search for Cloning an Existing Repository​

Then, you'll need to close Android Studio, delete the .idea folder and then open Android Studio again. It'll recreate the .idea folder and problem should be resolved.

like image 33
ahasbini Avatar answered Sep 28 '22 17:09

ahasbini