LiveDemo - Open-source alternative to Storylane, Navattic, and Arcade | Product Hunt

How to Squash Commits Sourcetree



How to Squash Commits Sourcetree: step-by-step guide

  1. Open Sourcetree and go to the repository.

  2. In the history view, find the commit you want to squash into. Right-click one commit before the oldest one you want to squash into and choose 'Rebase children of <commit> interactively…'

  3. The 'Interactive rebase' window will open. Leave the top commit and change the next ones.

  4. Click 'OK' to finish the squash.

  5. Sourcetree will perform the rebase and squash the commits.

Quick answer: To squash commits in Sourcetree, open your repository in the history view, right-click the commit before your target, and select 'Rebase children of <commit> interactively…'. In the window, adjust the commits below the top one and click 'OK' to let Sourcetree complete the rebase and squash.

About this Sourcetree tutorial

Combine and organize your git history efficiently by squashing commits using the interactive rebase feature in Sourcetree. This guide shows how to squash Commits Sourcetree in 5 steps, starting with "Open Sourcetree and go to the repository" and finishing with "Sourcetree will perform the rebase and squash the commits". The interactive demo above is a click-through copy of the real Sourcetree interface, so you can rehearse each step before doing it in your own account.

Frequently asked questions

How many steps does it take to squash Commits Sourcetree?

5 steps. Each one is listed in order above, and the demo highlights exactly where to click.

Can I try it without changing my own account?

Yes. Clicking through the demo doesn't touch your Sourcetree data or settings. Once you know the flow, repeat it in your own workspace.

This tutorial is filed under Sourcetree. Related guides: How to Sync Sourcetree with Visual Studio Code, How to Tag in Sourcetree and How to Update Sourcetree. Last reviewed 05 Oct 2026.

LiveDemo - Open-source alternative to Storylane, Navattic, and Arcade | Product Hunt
🚀

Create your first interactive demo in minutes

No credit card required • Start building today

Start free→

This website uses cookies to enhance the user experience.

AcceptDecline