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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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!

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]