chitcha
chitcha

Reputation: 33

how to undo git init?

I clicked git init in my users folder by mistake, and then everything in my users folder has been turned with a blue question mark.

How can I fix this?

Upvotes: 1

Views: 19979

Answers (2)

kiran puppala
kiran puppala

Reputation: 787

Short and simple

rm -rf .git

Then, reinitialize as the right user

Upvotes: 2

Ethaan
Ethaan

Reputation: 11376

Check the Documentation About git init

When you run git init, a new .git folder its created on your project directory with some other subdirectories for objects, refs/heads, refs/tags , since its a dot file (.git)its hidden by default, so if you are running linux do the following.

 cd myFolder
 rm -rf .git

If you are running Windows, there are bunch of tutorials to show hidden files, like this for example

Upvotes: 9

Related Questions