关于git:git-restore极简使用记录

用处

撤销批改。

应用示例

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

用法1

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

git restore .
// or
git restore filename

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

用法2

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

git restore --staged .
// or
git restore --staged filename

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

注意事项

暂无。

评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理