git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* How to git checkout a orgin(unstage) version file in another directoy?
@ 2011-02-17  7:00 Chunlin Zhang
  2011-02-17  8:26 ` Michael J Gruber
  2011-02-17 10:34 ` Jonathan Nieder
  0 siblings, 2 replies; 11+ messages in thread
From: Chunlin Zhang @ 2011-02-17  7:00 UTC (permalink / raw)
  To: git

I am writing a script for git-gui's "Tools" menu to diff a file.
I want to checkout an origin file in a tmp directory and use the diff tool.
Now it is ok to those unstage file,but to those staged file,
I found that I do not know how to checkout the orgin(unstage) version.

In detail,I change current directory to a tmp directory,
and use for example 
'git --work-tree=. --git-dir="/media/linux/t/kernel/.git" checkout README'
 to checkout origin version.

Does anyone can help with this? 
I look the git help and can not find way till now.

Thanks!

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-02-18  7:45 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-17  7:00 How to git checkout a orgin(unstage) version file in another directoy? Chunlin Zhang
2011-02-17  8:26 ` Michael J Gruber
2011-02-17 10:03   ` Chunlin Zhang
2011-02-17 10:17   ` Chunlin Zhang
2011-02-17 12:35     ` Michael J Gruber
2011-02-17 13:30       ` Chunlin Zhang
2011-02-17 18:33   ` Junio C Hamano
2011-02-18  7:41     ` Michael J Gruber
2011-02-17 10:34 ` Jonathan Nieder
2011-02-17 12:06   ` Chunlin Zhang
2011-02-17 17:17     ` Andreas Schwab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).