Ayende @ Rahien

Unnatural acts on source code

Where do git repositories go when they die?

My RDB repository started giving me this error;

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

I don’t think that I did anything to it, but it is still dead.

image

Any ideas how to recover this?

Update: Found why Git doesn't like my repository, it doesn't have .git\objects, but I have no idea where it could have gone to… or why.

Comments

13xforever
03/02/2010 01:57 PM by
13xforever

It's strange. My .git subdirectories aren't hidden. Maybe that's the cause?

Steve Wagner
03/02/2010 02:17 PM by
Steve Wagner

No the newer versions of msysgit hide the .git directory like it is on unix.

Sorry ayende, no idea what happen. Did you try git fsck?

Björn Steinbrink
03/02/2010 02:21 PM by
Björn Steinbrink

The contents of the .git directory would be more interesting ;-) IIRC, git looks for HEAD existing inside .git, so maybe that's gone for some reason?

Paco
03/02/2010 02:29 PM by
Paco

Looks like a file system issue

Chris
03/02/2010 04:11 PM by
Chris

Install Mercurial. That is not a flame btw, it's from experience. Git nearly murdered me twice with similar problems. It lacks any form of "engineering", relying on luck instead. SourceSafe was more reliable.

Thomas Vochten
03/02/2010 05:29 PM by
Thomas Vochten

Try going with the "Previous Versions" version of Windows to restore a version that worked. Should be turned on for the C drive automatically...

Comments have been closed on this topic.