0

I have accidentally made one of my folders a git repository by running git init. How I can reverse this process.

I am running windows ten and have git installed.

Alex Hawking
  • 1,125
  • 5
  • 19
  • 35
  • Delete the `.git` folder there. Note, unless you have a backup of it it is a irreversible action, so make sure you delete the *right* `.git` folder. – Lasse V. Karlsen May 18 '20 at 07:05
  • I cannot see the git folder, do I have to show hidden folders? I thought this was only a mac thing – Alex Hawking May 18 '20 at 07:05
  • No, hidden folders is absolutely a Windows thing as well. Though, depending on how the .git folder was created, sometimes it is hidden, sometimes it is not (has been my experience). – Lasse V. Karlsen May 18 '20 at 07:37
  • https://stackoverflow.com/search?q=%5Bgit%5D+undo+init – phd May 18 '20 at 13:40

1 Answers1

4

Just delete the .git folder in the root of your directory.

If you can't see it, check the "display hidden folders" in your windows directory settings

furyozo
  • 638
  • 5
  • 11