From: Adam A Date: Sat, 03 Aug 2013 21:46:47 GMT Subject: Re: Bug: Pulling remotes into an empty repo deletes the index Message-ID: In-Reply-To: <20130803165728.GB2893@elie.Belkin> On Sun, Aug 4, 2013 at 2:57 AM, Jonathan Nieder wrote: > Daniel Convissor wrote: > >> All is not lost. Your local files should be stored in the repository's >> reflog. Examine the output of "git reflog". You can then reset your >> working directory to obtain those files by doing something _like_ >> "git reset --hard HEAD@{1}". > > Adam hadn't made a commit, so that wouldn't work in this case. > > "git fsck --lost-found" should be helpful, but yeah, this is a bug. > See for example [1] for the start of a patch to play with (needs > tests). Ah I didn't realize the objects would still be there! `git fsck` + `git show` is a wonderful workaround until the bug is fixed. > > Thanks and hope that helps, > Jonathan > > [1] http://thread.gmane.org/gmane.comp.version-control.git/196502/focus=196503 Thanks so much guys! Adam