2019-10-31 git git使用技巧-撤销修改 git使用技巧-撤销修改git撤销修改 丢弃工作区的修改1git checkout --文件名称 把暂存区的修改撤销掉(unstage),重新放回工作区1git reset HEAD 文件名称 已经commit到版本库,想撤回本次commit前提:没有推送到远端 1git reset --hard HEAD^ 或者 1git reset --hard commit_id Newer git使用技巧-stash保存现场,恢复现场 Older 分布式id生成-雪花算法实现资源汇总