$ git checkout <commit-hash> -- <filename>
在这个命令中, --
表示参数的结束, <filename>
是要还原的文件名
例子:
git checkout 070a6677af7d7b14b3ea65d4e63f5a249e3645e8 -- config.json
$ git checkout <commit-hash> -- <filename>
在这个命令中, --
表示参数的结束, <filename>
是要还原的文件名
例子:
git checkout 070a6677af7d7b14b3ea65d4e63f5a249e3645e8 -- config.json