恢复已删除且已添加至暂存区的文件

恢复前的状态

先恢复到未暂存区
git restore --staged src/main/resources/schema.sql

从暂存区恢复
git checkout -- src/main/resources/schema.sql

posted @ 2020-11-30 17:17  刘易L  阅读(201)  评论(0编辑  收藏  举报