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. -- 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