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

How make "git checkout <commit> <file>" *not* alter index?

From
Cchris@seberino.org <chris@seberino.org>
Date
Jan 6, 2009, 05:18 UTC
Message-ID
<20090106051852.GA3278@seberino.org>

I want to pull an old version of a file into my local directory and make it appear like work I haven't added to index yet...

So how modify
git checkout <commit> <file>
to do this?
cs
Next: Jike Song
Message 1 of 4 in “How make "git checkout <commit> <file>" *not* alter index?”
  1. chris@seberino.orgJan 6, 2009
  2. Jike SongJan 6, 2009
  3. Junio C HamanoJan 6, 2009
  4. chris@seberino.orgJan 7, 2009

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.