How can I see a file as it was at a particular git commit?
Given a file foo.m, how can I get Git to show me the complete con开发者_JAVA百科tents of foo.m, as they were at some commit x?
git checkout sha1_here -- foo.m
or without checking the file out and just viewing it from the command line
git show sha1_here:path_to_file/foo.m
精彩评论