用处

撤销批改。

应用示例

工作区(Changes) > 暂存区(Staged Chagnes) > 本地仓库 > 近程仓库

用法1

把文件从工作区Changes下抛弃。

git restore .// orgit restore filename

执行git restore .后,Changes被清空并暗藏了。

用法2

把文件从暂存区Staged Changes下退回到Changes

git restore --staged .// orgit restore --staged filename

执行git restore --staged .后,原来在Staged Changes下的文件被退回到Changes下了。

注意事项

暂无。