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

Re: How to git checkout a orgin(unstage) version file in another directoy?

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Feb 18, 2011, 07:41 UTC
Message-ID
<4D5E22BE.301@drmicha.warpmail.net>
In-Reply-To
<7vpqqqcxzf.fsf@alter.siamese.dyndns.org>
Junio C Hamano venit, vidit, dixit 17.02.2011 19:33:
Show 11 quoted lines
> Michael J Gruber <git@drmicha.warpmail.net> writes:
> 
>> I'm not sure what you mean by "origin" version, but if you mean the
>> version from the current revision (before making and staging changes),
>> you would check out from HEAD instead of from the index:
>>
>> git --work-tree=. --git-dir="/media/linux/t/kernel/.git" checkout HEAD
>> -- README
> 
> Wouldn't that still affect the index in /media/linux/t/kernel/.git/index,
> making /media/linux/t/kernel/README and the index entry out-of-sync?

Yes. I guess you overlooked the two posts where Chunlin and I realised that I took his request for "checkout" too giterally.

Michael
Previous: Junio C HamanoNext: Jonathan Nieder
Message 8 of 11 in “How to git checkout a orgin(unstage) version file in another directoy?”
  1. Chunlin ZhangFeb 17, 2011
  2. Michael J GruberFeb 17, 2011
  3. Chunlin ZhangFeb 17, 2011
  4. Chunlin ZhangFeb 17, 2011
  5. Michael J GruberFeb 17, 2011
  6. Chunlin ZhangFeb 17, 2011
  7. Junio C HamanoFeb 17, 2011
  8. Michael J GruberFeb 18, 2011
  9. Jonathan NiederFeb 17, 2011
  10. Chunlin ZhangFeb 17, 2011
  11. Andreas SchwabFeb 17, 2011

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.