1.通過git reflog命令查看操作日志:
gitreflog
2.查看對(duì)應(yīng)的版本號(hào),就可以恢復(fù)到任意版本:
867c8e1f9 (HEAD -> master, origin/master, origin/HEAD) HEAD@{0}: commit: h5帶商品跳轉(zhuǎn)到互動(dòng)社區(qū)發(fā)帖商品置頂、陳列點(diǎn)評(píng)評(píng)語字?jǐn)?shù)調(diào)整到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: 陳列點(diǎn)評(píng)增加評(píng)語字?jǐn)?shù)到500、h5跳轉(zhuǎn)到互動(dòng)社區(qū)帶的商品
要置頂顯示
e5d6c74b9 HEAD@{6}: checkout: moving from HomeSpecial to master
639125d24 (origin/HomeSpecial, HomeSpecial) HEAD@{7}: commit: 首頁個(gè)性化列表接口增加status字段
bc10d9699 HEAD@{8}: checkout: moving from master to HomeSpecial
e5d6c74b9 HEAD@{9}: checkout: moving from HomeSpecial to master
3.恢復(fù)版本:
gitreset--hard "6e0e8a04c"