4

I'm using SourceTree Windows version.

One feature that I can't seem to find is the squash and merge; when I finish my work on a branch, I want to merge it into the main branch and I just want the main branch to have one commit, to keep the commit history uncluttered.

It seems that I need to use the command line to do it? ie: git merge --squash? But is there an UI way of doing it?

The interactive rebase function seems to work for squash, but not exactly squash and merge.

Graviton
  • 81,782
  • 146
  • 424
  • 602
  • To my knowledge it's not implemented in Sourcetree. – Adam Mar 05 '21 at 12:57
  • Does this answer your question? [Squash in SourceTree](https://stackoverflow.com/questions/18348330/squash-in-sourcetree) – Tim Sylvester Jul 14 '22 at 20:22
  • @TimSylvester, you are putting forward a link that I don't find helpful ( and I've already explained why) – Graviton Jul 15 '22 at 06:21
  • That's how you do it in SourceTree, so this is a duplicate. Of course a UI is not exactly like command line, but if you have a particular difference in mind, you'll need to be more specific. I just squashed a branch down to one commit with interactive rebase and then merged it and didn't see any difference from a command-line or GitHub squash-merge. – Tim Sylvester Jul 15 '22 at 19:59

0 Answers0