git 恢复单个文件的历史版本
本文转载自:https://www.cnblogs.com/zhulin/archive/2012/06/09/2542785.html作者:zhulin 转载请注明该声明。首先查看该文件的历史版本信息:git log Default@2x.png记录下需要恢复的commit版本号:如9aa51d89799716aa68cff3f30c26f8815408e926恢复该文件:git ...
·
本文转载自:
https://www.cnblogs.com/zhulin/archive/2012/06/09/2542785.html 作者:zhulin 转载请注明该声明。
首先查看该文件的历史版本信息:git log Default@2x.png
记录下需要恢复的commit版本号:如 9aa51d89799716aa68cff3f30c26f8815408e926
恢复该文件:git reset 9aa51d89799716aa68cff3f30c26f8815408e926 Default@2x.png
提交git:git commit -m "revert old file"
更多推荐
已为社区贡献13条内容
所有评论(0)