0

I think I made a git repository in a folder by mistake because my vscode keeps showing me this popup. This is a huge problem as it is a root level directory as you can see in the image. How should I deal with this. I would like to delete the git repo, it's on my local machine and I haven't pushed it of course.

enter image description here

What I tried: I tried looking for a .git file in the directory but there were a lot of other git files but no .git and I thought I shouldn't delete them as it's a root directory and might have files for the installed gitbash and config stuff like that.

Odasaku
  • 177
  • 6
  • 17
  • Just remove (recursively) the `.git` directory and all its contents. Be very careful that you're removing the right one and don't want anything out of it first! – torek Jun 12 '21 at 09:29
  • The .git-**directory** is usually hidden on windows. You can try to manually enter `C:\Users\Admin\.git` in the Windows explorer – Daniel Jun 12 '21 at 09:29
  • you have run `git init` inside your user folder (Admin in this case), delete the folder `C:\Users\Admin\.git` to get rid of this issue. – fredrik Jun 12 '21 at 09:29
  • https://stackoverflow.com/search?q=%5Bgit%5D+undo+init+home – phd Jun 12 '21 at 09:56
  • @Daniel I found the .git folder using your way. I just wanted to confirm that I need to simply delete it right? – Odasaku Jun 12 '21 at 11:53

1 Answers1

0

.git folder is a hidden. open windows settings, choose option to show hidden folders and you can see it in the root folder. https://support.microsoft.com/en-us/windows/view-hidden-files-and-folders-in-windows-10-97fbc472-c603-9d90-91d0-1166d1d9f4b5

Taron Qalashyan
  • 660
  • 4
  • 8
  • 1
    I found the .git folder using the way Daniel mentioned. I just wanted to confirm that I need to simply delete it right – Odasaku Jun 12 '21 at 11:54