I have a branch called work_in_progress which is used to debug and test code with many small commits. All of them have redundant commit messages. When I'm finished I want to merge squash to master branch. Usually this is one single command when merging using the --squash parameter.
But how do I do it with SmartGIT?
The documentation here How to perform squash merges seems to be wrong because there is no option "Branch consisting of selected commit and its ancestors".
The documentation here How to perform normal merges and squash merges simply does not work. I have tried it and I still see all the small commits in the log. I can delete the work_in_progress branch afterwards, all fine, but I want a single commit with a single commit message in the history of the master branch.
Edit: Here is a screenshot from my commit dialog. I guess I'm missing the "Simple commit" option?! Maybe I don't understand the instructions^^

Edit 2: Here is a screenshot of the Log. The second commit from the top was done using SmartGIT. You can see that all the intermediate commits (including the messages) are visible in the history. The branch was called XYZ_work_in_progress. The last (top most) commit was done using "git merge --squash ABC_work_in_progress" but all the commits are swallowed so it's a clean history. All the work from the branch is accumulated into a single commit with a single message :-)

Here's the typical situation: Things developed on your feature branch, meanwhile the world kept turning and more stuff happened on the common master branch.

4) right-click on the master tip (line1) pick Rebase HEAD to... (certainly not Rebase to HEAD... ➝ trouble, that won't become so obvious for several steps...). Press the Button in the dialog to confirm.
5) You got the feature commits played on top. As hollow orange circles, since things are not yet committed.
6) right-click on feature branch, say Push to.... Pick (o)Tracked or matching branch and —important— [x]Force Pushing (since you are “changing history” of your feature branch...)
History is now looking clean, your commits being in line, aka fast-forwardable:

Merge.... In the options dialog, you have to pick Merge to Working Tree (otherwise the commit happens without you being able to pick any options, i.e. squash).
you may or may not have to go through resolving and then continue.
Finally, say commit. Pick (o) Simple commit (one parent, "squash")

...and there she is:

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