Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot remove git repository completely

I have been using git on windows-msysgit. Whenever I try to remove a repository completely either using explorer or using

$ git rm -rf ptp/
fatal: Not a git repository (or any of the parent directories): .git

it errors out "The data present in the reparse point buffer is invalid" or the fatal error above.

What's wrong with me/git?

Thanks in advance

like image 974
Aleyna Avatar asked Mar 05 '10 01:03

Aleyna


3 Answers

I tried to remove GIT on my windows-XP, by means of the Windows/Configuration/Software menu. After some error message (which I cannot remember), it removed all files. I checked it, and there are no files with ptp in the name left on the entire system.

A problem remained however: each time I opened windows-explorer, a nasty error message came calling for a dll file that wasn't there anymore.

When checking the registry, there were many traces to GIT left in the registry. I removed them carefully by hand, which seems to have solved the problem. This is of course a dangerous path, but I had no choice. Perhaps it is a good idea to look into the Windows-deinstallation script very carefully.

Stef Joosten

like image 25
curtwphillips Avatar answered Sep 28 '22 01:09

curtwphillips


To remove a git repo, just do rm -rf ptp/. That's it. git rm is used to move items from the index [the staging area for changes / new files], not to delete git repositories.

like image 188
rmk Avatar answered Sep 28 '22 02:09

rmk


To get rid of the git repository on Windows do this:

Win+R, Type cmd, Enter.

> cd c:/path/to/parent/of/ptp-repo
> rmdir /S /Q ptp

Or if it fails then check who locks the directory and delete it by hands from Explore.

Most likely some process holds a lock on files/dirs in your repo.

like image 22
Dmytrii Nagirniak Avatar answered Sep 28 '22 01:09

Dmytrii Nagirniak