From: Tomas Carnecky <tom@dbservice.com>
To: PJ Weisberg <pjweisberg@gmail.com>
Cc: David Barr <davidbarr@google.com>,
Edmondo Porcu <Edmondo.Porcu@gottexbrokers.com>,
"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: Objects deleted before first commit
Date: Thu, 16 Jun 2011 22:38:17 +0200 [thread overview]
Message-ID: <4DFA69B9.3020605@dbservice.com> (raw)
In-Reply-To: <BANLkTin9_jfvtYdCsJLiWAoOvO2e1f=9SA@mail.gmail.com>
On 6/14/11 4:44 PM, PJ Weisberg wrote:
> On Tuesday, June 14, 2011, David Barr<davidbarr@google.com> wrote:
>> On Tue, Jun 14, 2011 at 11:00 PM, Edmondo Porcu
>> <Edmondo.Porcu@gottexbrokers.com> wrote:
>>> dangling blob 43cb00bb9f23b73afc874c4105b136f8c426e4a5
>>> dangling blob 48ef642adb1549ee1d4040ec9337d3a47c19d422
>> [...]
>>
>> Was it 'rm -rf' or 'git rm -rf'?
>> If just the non-git command, maybe 'git checkout --<missing paths>'?
> Not if it was never checked in, unfortunately.
You don't need to commit the file. If you add files with `git add` and
then delete them with plain `rm`, you can recover them with a simple
`git checkout`, just like David suggested. See this transcript:
$ git init tmp
Initialized empty Git repository in <snip>/tmp/.git/
$ cd tmp
$ touch file
$ git add file
$ rm file
$ ls file
ls: file: No such file or directory
$ git checkout -- file
$ ls file
file
$
prev parent reply other threads:[~2011-06-16 20:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-14 12:43 Objects deleted before first commit Edmondo Porcu
2011-06-14 12:57 ` David Barr
2011-06-14 13:00 ` Edmondo Porcu
2011-06-14 13:06 ` David Barr
2011-06-14 14:44 ` PJ Weisberg
2011-06-14 14:46 ` Edmondo Porcu
2011-06-14 14:56 ` Carlos Martín Nieto
2011-06-14 14:57 ` PJ Weisberg
2011-06-14 14:59 ` Edmondo Porcu
2011-06-16 20:38 ` Tomas Carnecky [this message]
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=4DFA69B9.3020605@dbservice.com \
--to=tom@dbservice.com \
--cc=Edmondo.Porcu@gottexbrokers.com \
--cc=davidbarr@google.com \
--cc=git@vger.kernel.org \
--cc=pjweisberg@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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.