Spot Reset Mistake
找错误 中等
题目
这个 command 是 meant 到 unstage file. 什么是 错误使用 using --困难?
代码
git reset --hard file.txt
提示
--困难是 overkill for unstaging.
解释
git reset --困难 discards 所有更改 permanently — 它是 不 for unstaging 单个 file. 到 unstage file 不使用 losing 更改, use git reset file.txt (默认 mixed 模式) or git restore --staged file.txt. --困难 flag 应该仅 是 used 当你 想要到 permanently discard 一切.
相关资源
相关课程
相关速查表
查阅不认识的术语
新手友好的术语表用大白话解释编程术语——变量、函数、DOM、Promise 等等。
解读错误信息
用大白话解释常见错误——什么意思、为什么发生、如何修复。
动手做项目
通过引导式项目应用所学,含起始代码与解决方案。