git reset
commit模式
回退HEAD到某个分支/提交快照
git reset (<branch_name>|HEAD|<tree-ish>|<tag_name>) [--mixed | --soft | --hard | --merge | --keep]回退整个暂存区的修改
git reset清空所有更改
file模式
回退某个文件/文件夹的索引树,到某个分支/提交快照
撤销暂存修改
注意事项
Last updated
Was this helpful?