雖說用 git rebase 來整理 commit 後再推上遠端,可以讓 commit 變得整齊許多。不過若你今天要 rebase 的對象是這份專案最初的第一筆 commit,那麼指令和以往的 git rebase -i <commit branch name> 會有一點不同。
指令
第一筆 commit 用 id 是無法進行的,需要使用 root 作為代稱。因此指令為 git rebase -i –root 才能正常的進入互動模式。
參考資料
1. How do I git rebase the first commit?
按讚加入粉絲團
![[筆記] Git rebase 專案的第一筆 commit [筆記] Git rebase 專案的第一筆 commit](https://smlpoints.com/wp-content/uploads/notes-git-ignore-ds_store-files-and-so-on-gitignore-1.jpg)