Subject: Re: Deleted files can't be checked back out?

From: Jakub Narebski <[email-masked]>
Date: Fri, 23 May 2008 17:43:05 -0700 (PDT)

fREW <[email-masked]> writes:

> I recently deleted a bunch of files and checked the change into git,
> and then changed my mind and wanted the files back.  I did a
> git-checkout <file> and got each file back individually.  Then I did
> some work and did a git-push to upload to github. Then I did more work
> and tried to do a git push and it gave me an error that apparently
> meant I had to pull before I pushed.  

You didn't change history, did you (e.g. using rebase)?

> Anyway, I pulled, it redeleted the files and now when I do
> git-checkout <file> to get them back it says:
> 
> error: pathspec 'foo' did not match any file(s) known to git.

Use "git checkout -- <file>" (or "git checkout HEAD -- <file>") to do
a checkout of a file which is not present in the working area.

-- 
Jakub Narebski
Poland
ShadeHawk on #git