I'm trying to squash commits so that my repo history is not littered with unimportant commits like "minor fix 1", "minor fix 2".. and so on. But I seem unable to do it using sourcetree UI.
I made a number of commits with self-descriptive names such as "A major part of the work", "minor fix", "fix 2" ( not yet pushed to remote). And of course I want to squash all these 3 commits into a proper commits such as "do feature a2a".
The first step is I click on "rebase children interactively on the previous commits", and then I try to rearrange the commits so that they represent the logical order I want them to be in. In my case here, I arrange them so that all the minor fixes are subsumed under a major commit, and arranged in chronological order, and of course I also edit the commit message to make it clearer, as shown below per the instruction here:
Then I click OK, but then, I got this message (MERGING CONFLICT):
I've no idea why there is a merge conflict? How to fix it? Is there anyway to get the squash commits working properly using sourcetree UI alone ( without using the git command line)?
I guess now I figure out how it works:
Amend Commit?
column is not ticked. One can edit the commit comment before and tick the Amend Commit?
column, but not when one is prepared to click on the OK
button.#
. If you must label your commit starting with bug number (eg: #1234
), you might want to append a few white spaces in front of #
(eg: #1234
)