Enter git show
, which is an awesome tool for this job. This command is quite versatile and deserves several tips on what it can do, but let’s stick to the task at hand: we want to pull a file’s contents out from a specific revision. Usually the command would be done like so:
git show <treeish>:<file>
http://gitready.com/intermediate/2009/02/27/get-a-file-from-a-specific-revision.html
转载于:https://my.oschina.net/u/2308739/blog/842675