git - linchuan1982/meta GitHub Wiki
| reset | checkout | revert |
|---|---|---|
| 命令 | 作用域 | 常用情景 |
| git reset | 提交层面 | 在私有分支上舍弃一些没有提交的更改 |
| git reset | 文件层面 | 将文件从缓存区中移除 |
| git checkout | 提交层面 | 切换分支或查看旧版本 |
| git checkout | 文件层面 | 舍弃工作目录中的更改 |
| git revert | 提交层面 | 在公共分支上回滚更改 |
| git revert | 文件层面 | (然而并没有) |
https://gitbook.tw/chapters/using-git/reset-commit.html
pre-commit
$ flake8 --install-hook git
$ git config --bool flake8.strict true