how to restore deleted file

Possible Duplicate:
Restore a deleted file in a Git repo

How do I restore a file I accidentally removed from my git repository? I know this is a trivial question, but I haven't found the answer in the documentation.


git checkout <commit> <path>

Commits may be specified directly by SHA1, or via a branch or tag. Make sure that the represents the state of the repository when the deleted file was still present. If the commit argument is omitted, the currently checked out commit (HEAD) will be used.

链接地址: http://www.djcxy.com/p/18928.html

上一篇: 无法恢复Git中的文件

下一篇: 如何恢复已删除的文件