git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Simple problem

From
KTKenneth P. Turvey <kt-usenet@squeakydolphin.com>
Date
Apr 28, 2008, 18:58 UTC
Message-ID
<fv56pb$ceb$1@ger.gmane.org>
In-Reply-To
<20080428164945.GA14445@atjola.homenet>
On Mon, 28 Apr 2008 18:49:45 +0200, Björn Steinbrink wrote:
[Snip]
> That restores the version from the index, so it will fail if you did
> "git rm file". To get the file from HEAD use "git checkout HEAD --
> file".

Thanks. I tested this and it works as advertised. I took a look at the man page and I understand what the -- is for too.

I had actually tried:
git checkout myfile.java
and this didn't work.
-- 
Kenneth P. Turvey <kt-usenet@squeakydolphin.com>
Previous: Björn SteinbrinkNext: Alex Riesen
Message 4 of 5 in “Simple problem”
  1. Kenneth P. TurveyApr 28, 2008
  2. Bill LearApr 28, 2008
  3. Björn SteinbrinkApr 28, 2008
  4. Kenneth P. TurveyApr 28, 2008
  5. Alex RiesenApr 28, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.