# How to Squash Commits Sourcetree

> 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.

Canonical: https://livedemo.ai/tutorials/how-to-squash-commits-sourcetree/
Apps: Sourcetree
Updated: 2026-10-05
Interactive demo: https://story-api.livedemo.ai/workspaces/62255d3d3304f17b8f5e2d03/stories/692a4ef1ab56e05a00ffae23/preview?step=1

## Steps

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.
