git有如下三种状态:

- Modified: You have changed the file but have not committed it to your database yet.
- Staged: You have marked a modified file in its current version to go into your next commit snapshot.
- Committed: The data is safely stored in your local database.
现在主要讲述下git的撤销操作:
discard changes in working directory
前提:<file>已经被添加到暂存区
git restore <file>
working direction <- index
git reset HEAD <file>
index <- HEAD
git reset --soft HEAD^
working direction <- HEAD
git reset --hard HEAD^
Git撤销操作详解
642

被折叠的 条评论
为什么被折叠?



