1.通过git reflog命令查看操作日志:
gitreflog
2.查看对应的版本号,就可以恢复到任意版本:
867c8e1f9 (HEAD -> master, origin/master, origin/HEAD) HEAD@{0}: commit: h5带商品跳转到互动社区发帖商品置顶、陈列点评评语字数调整到500字
6e0e8a04c HEAD@{1}: pull origin master: Fast-forward
fe1835181 HEAD@{2}: rebase (abort): updating HEAD
fe1835181 HEAD@{3}: rebase (abort): updating HEAD
675f8e34e HEAD@{4}: rebase (skip): updating HEAD
675f8e34e HEAD@{5}: commit: 陈列点评增加评语字数到500、h5跳转到互动社区带的商品
要置顶显示
e5d6c74b9 HEAD@{6}: checkout: moving from HomeSpecial to master
639125d24 (origin/HomeSpecial, HomeSpecial) HEAD@{7}: commit: 首页个性化列表接口增加status字段
bc10d9699 HEAD@{8}: checkout: moving from master to HomeSpecial
e5d6c74b9 HEAD@{9}: checkout: moving from HomeSpecial to master
3.恢复版本:
gitreset--hard "6e0e8a04c"