轉自:
https://blog.csdn.net/themagickeyjianan/article/details/80333645
改進版本:合並多個提交為一條(git merge --squash branchname)
但是,操作方便並不意味着這樣操作就是合理的,在某些情況下,我們應該優先選擇使用--squash
選項,如下:
$ git merge --squash anotherbranch $ git commit -m "squash merge description"