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

Re: Can I checkout a single file without altering index?

From
Tomas Carnecky <tom@dbservice.com>
Date
Oct 12, 2010, 16:39 UTC
Message-ID
<4CB48F56.3020404@dbservice.com>
In-Reply-To
<AANLkTinnYEnCwpTh45N69n73JQm=ndXH-SUJ5b1piUYv@mail.gmail.com>
On 10/12/10 5:39 PM, Alex Riesen wrote:
Show 7 quoted lines
> On Tue, Oct 12, 2010 at 12:03, Christian Halstrick
> <christian.halstrick@gmail.com> wrote:
>> Can I checkout a certain file to a specific revision without also adding this
>> content to the index? I only want to alter the working-tree - no modification of
>> index or HEAD needed.
> 
> "git show <revision-specification>:path/name > path/name" ?

I heard that git-show doesn't apply filters to the file (smudge/clean or any custom ones). Keep that in mind when using it.

tom
Previous: Alex RiesenNext: Christian Halstrick
Message 6 of 16 in “Can I checkout a single file without altering index?”
  1. Christian HalstrickOct 12, 2010
  2. Michael J GruberOct 12, 2010
  3. Stefan NaeweOct 12, 2010
  4. Jared HanceOct 13, 2010
  5. Alex RiesenOct 12, 2010
  6. Tomas CarneckyOct 12, 2010
  7. Christian HalstrickOct 14, 2010
  8. Neal KreitzingerOct 15, 2010
  9. Jonathan NiederOct 15, 2010
  10. Jeff KingOct 15, 2010
  11. Jonathan NiederOct 15, 2010
  12. Jeff KingOct 15, 2010
  13. Neal KreitzingerOct 15, 2010
  14. Andreas SchwabOct 15, 2010
  15. Junio C HamanoOct 15, 2010
  16. Jonathan NiederOct 15, 2010

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.