暫存

暫存現況操作,save可省略

$ git stash save

顯示暫存清單

$ git stash list

恢復暫存操作

$ git stash pop

git合併commit

rebase -i

查看commit列表

$ git log --oneline

要將紅框內commit合併

git rebase -i 'log編號'

截圖 2021-08-13 下午12.17.37.png

確認後進入vim編輯器

截圖 2021-08-13 下午12.22.26.png

pick ⇒ 忽略

reword ⇒ 修改文字

squash ⇒ 將指定commit與前一個commit合併成同一個

回覆上個commit