Elijah Kingson
Elijah Kingson

Reputation: 21

How can I un-init a folder I already initialized with the Git Shell on my PC?

I created a "Projects" folder where I have all my web dev projects. I used git init on the folder before creating subfolders, which I also used the git init command for.

Now I want to treat them independently. How do I un-init the "Projects" folder that houses the other folders where my projects are?

Upvotes: 2

Views: 526

Answers (3)

Sum1NamedJon
Sum1NamedJon

Reputation: 1

Using windows command line requires rmdir and other syntax:

rmdir /s .git

C:\Users\username\Projects> rmdir /s .git

Windows cmd line code to remove a directory, which in this case is the errantly placed - and hidden - git directory. Hidden directories start with a period (".") as shown above.

Add /s to allow removal despite the directory having sub-files and/or sub-directories.

Upvotes: 0

Mureinik
Mureinik

Reputation: 312136

AFAIK, git doesn't have an "uninit" command. You could, however, just remove the .git folder that git init created. E.g., in *nix systems:

~/Projects$ rm -rf .git

Upvotes: 1

Karthik
Karthik

Reputation: 979

Just delete the .git folder in the folder where init was called.

Upvotes: 4

Related Questions