在「Split a commit in two with Git」這邊看到有趣的方法:
git rebase -i <oldsha1> # mark the expected commit as `edit` (replace pick in front of the line), save a close git reset HEAD^ git add ... git commit -m "First part" git add ... git commit -m "Second part" git rebase --continue
squash 是把多個 commit 合起來,這個方法是拆開。還沒有 push 出去,需要整理時應該會用到...
推薦這篇 http://blog.yorkxin.org/posts/2011/07/29/git-rebase