3

I wanted to remove a Git folder from my computer so without going into the git console, I deleted the folder using the Windows FS. Whenever I boot up the git console however, I realize that the Git folder that I just deleted still exists. It is not on my computer that I can see, and every time I try to run "rm -r FolderName", it pops up a message asking if I am sure I want to remove a write protected file with

"rm: remove write-protected file 'Folder/.git/objects/34/33535dg3e4t'?" 

This would be fine, but there are thousands of them, and I am not going to sit there all day typing "y". I also try to type

"git rm -r FolderName" 

but this command does not work and it says

"fatal: Not a git repository (or any of the parent directories): .git" 

3 Answers 3

9

What about rm -rf FolderName?

Sign up to request clarification or add additional context in comments.

Comments

1

Alternatively

yes | rm -r FolderName 

I usually prefer this approach, because I just type Ctrl+A to go to the beginning of the command prompt, then type yes |, which is faster than going back to write the -f flag.

Comments

0

All I had to do was run

rm -rf ptp/ FolderName 

Cannot remove git repository completely

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.