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

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

After this the error should disappear