Re: How to git checkout a orgin(unstage) version file in another directoy?
- From
Chunlin Zhang <zhangchunlin@gmail.com>
- Date
- Feb 17, 2011, 10:17 UTC
- Message-ID
- <loom.20110217T110820-459@post.gmane.org>
- In-Reply-To
- <4D5CDBAD.4050700@drmicha.warpmail.net>
Michael J Gruber <git <at> drmicha.warpmail.net> writes:
> git --work-tree=. --git-dir="/media/linux/t/kernel/.git" checkout HEAD
But after I test,I found that after run this command,the file I do checkout action become unstaged. It is weard,because I have set the "--work-tree" to another directory. my command line for example: git --work-tree=. --git-dir="/media/linux/t/kernel/.git" checkout HEAD -- Android.mk
You can test with a git repository.I have no idea how to work around now.