一、git日誌查詢
- git log
- git log --pretty=oneline:一次提交顯示一行
- git log --oneline:簡潔版顯示
- git reflog:簡潔plus版顯示
(1. )git log
(2).git log --pretty=oneline:一次提交顯示一行
(3).git log --oneline:簡潔版顯示
(4.)git reflog:簡潔plus版顯示
二、版本回退
(1). 使用版本號回退或前進
git reset --hard [版本號]:前進或後退到指定索引號的位置
(2). 使用^符號 (只能後退)
git reset --hard head^^^:添加幾個^就會往後退幾步
(3).使用~符號 (只能後退)
git reset --hard head~n:表示後退n步