From: Mike Hommey <mh@glandium.org>
To: Joe Fiorini <joe@faithfulgeek.org>
Cc: git@vger.kernel.org
Subject: Re: Undo git-rm without commit?
Date: Wed, 26 Mar 2008 07:24:22 +0100 [thread overview]
Message-ID: <20080326062422.GA18856@glandium.org> (raw)
In-Reply-To: <D6386C1A-92D3-4E11-8DE6-CC7553211A33@faithfulgeek.org>
On Wed, Mar 26, 2008 at 02:17:18AM -0400, Joe Fiorini wrote:
> I hadn't done a git-commit yet, but I used git-rm thinking it would
> remove files that I had just added. Instead, it deleted everything I
> had added from the disk. Is there a way to undo this? I'm doubtful,
> but would love to not have to rewrite what I was working on.
Your best take would be to take a look at the unreachable loose objects
in your repository. One way to have a list of them would be to do a
git prune -n. Then you can look at the contents of each blob in those
with either git cat-file -p $sha1, or git show $sha1.
Mike
PS: What you wanted to use is git reset, not git rm.
next prev parent reply other threads:[~2008-03-26 6:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-26 6:17 Undo git-rm without commit? Joe Fiorini
2008-03-26 6:24 ` Mike Hommey [this message]
2008-03-26 6:26 ` Jeff King
2008-03-26 6:38 ` Joe Fiorini
2008-03-26 6:39 ` Jeff King
2008-03-26 9:48 ` Matthieu Moy
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080326062422.GA18856@glandium.org \
--to=mh@glandium.org \
--cc=git@vger.kernel.org \
--cc=joe@faithfulgeek.org \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox