用处
撤销批改。
应用示例
工作区(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
下了。
注意事项
暂无。