If the following is a list of commits on a branch:
A - B - C - D
How can I combine commits A and C into (AC)?
(AC) - B - D
In case you are using the Tower Git client, using Interactive Rebase to squash some commits is very simple: just select the commits you want to combine, right-click any of them, and select the "Squash Revisions..." option from the contextual menu.
First do git rebase -i aaaaaa^
and then your text editor will show up looking like this:
pick aaaaaa pick bbbbbb pick cccccc pick dddddd
Change it so that it looks like
pick aaaaaa squash cccccc pick bbbbbb pick dddddd
and close it and git does the rest.
http://git-scm.com/docs/git-rebase
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With