Undo git init command

Hi,
Does anyone know how can i undo git init command ?
I’m not familiar with git so i don’t know if what i’m asking is even possible :slight_smile:
Thank you in advance :heart:

I found this reply on :

You’re running rm -rf in powershell, which doesn’t have rm. You can use del .
It worked, but is there any other way that is more elegant and reasonable ? something that mosh might explained in his GIT course ?

Just delete the .git directory.

1 Like

When i delete .git this is what i get.

If that’s not what you expected try deleting .gitignore also.

So i did rm -force .git and it worked :slightly_smiling_face:

But in his git course is it going to be like this ? Windows users must suffer finding the right command ?
For instance mosh uses open .git and .git directory will show up, but didn’t say what windows users should do, I knew that the equivalent of open in mac is start in windows, but what if someone doesn’t know and get frustrate to continue the course ?

I have no idea what you are talking about but someone who wants to program a computer should first be able use it.

Mosh says “and if you’re on Windows you can open it with ‘Windows Explorer’ or ‘File Explorer’ - I’m not sure what it’s called these days” - so he does says what windows users should do. Regardless, someone who wants to become a software developer should be able to do every day tasks like listing the contents of a directory on his/her own.

I recently switched to linux - zorin os kernal. I love it, and highly reccomend it. It’ll save you a lot of head ache.

What you’re saying is true but since it’s a comprehensive course and most of the work gets done on the cmd i want to know what is the command line to use not using File Explorer.
Or he could at least create a cheatsheet to differentiate mac commands from windows such as ls which is for mac and dir for windows.

I wasn’t able to find the answer on the web i just figured it out myself and it’s fine but i purchased the course to save time and learn fast

So I am curious, what was your solution?

Just look at the picture i’ve sent

1 Like

To delete a git repository (that means the folder is no longer a git repository)
$ rm -rf .git