开发者

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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜