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

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

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

筚路蓝缕启山林,栉风沐雨砥砺行。
恢复前的状态

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

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