GIT 学习二 (查看日志和回退)

git log(--pretty=oneline)

    查看日志, (--pretty=oneline) 简化信息.

git reset --hard head

    版本回退  head 表示当前版本

git reflog  

    显示所有日志 和 git log 不同 (git log 只能看到当前版本之前的log) 

git reset --hard commit id

    通过 git reflog 可以查到所有提交的 commit id 然后可以通过 git reset --hard commit id 回退到此次提交的版本

原文地址:https://www.cnblogs.com/shouwangzhe-/p/4605702.html