git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Adam A <hitsthings@gmail.com>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: Daniel Convissor <danielc@analysisandsolutions.com>, git@vger.kernel.org
Subject: Re: Bug: Pulling remotes into an empty repo deletes the index
Date: Sun, 4 Aug 2013 07:46:47 +1000	[thread overview]
Message-ID: <CAJOTJ-D6Aho_NJscXtu74Ok7u5sQmHn_L_Nma_F1kn9O6y95UQ@mail.gmail.com> (raw)
In-Reply-To: <20130803165728.GB2893@elie.Belkin>

On Sun, Aug 4, 2013 at 2:57 AM, Jonathan Nieder <jrnieder@gmail.com> 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

  parent reply	other threads:[~2013-08-03 21:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAJOTJ-AVamimToPo4oQ=O_Pg+mJHQhardO+NfU8b1dvRxg1KMA@mail.gmail.com>
2013-08-03 12:01 ` Bug: Pulling remotes into an empty repo deletes the index Adam A
2013-08-03 16:39   ` Daniel Convissor
2013-08-03 16:57     ` Jonathan Nieder
2013-08-03 17:01       ` Daniel Convissor
2013-08-03 21:46       ` Adam A [this message]
2013-08-10  7:33       ` Jeff King
2013-08-03 16:59     ` Daniel Convissor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJOTJ-D6Aho_NJscXtu74Ok7u5sQmHn_L_Nma_F1kn9O6y95UQ@mail.gmail.com \
    --to=hitsthings@gmail.com \
    --cc=danielc@analysisandsolutions.com \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).