This interactive demo was created free with Storylane in 2 minutes. Create your own demo
This interactive demo was created free with Storylane in 2 minutes. Create your own demo
Start free
All Tutorials /Sourcetree

How to Squash Commits Sourcetree

Updated on:
June 5, 2026
By:
Madhav Bhandari
Use this interactive demo to learn how to squash commits using interactive rebase in Sourcetree.

Quick summary

Squashing commits in Sourcetree combines multiple commits into one using the interactive rebase feature, keeping your Git history clean and readable. This guide walks you through the exact steps to right-click a commit, configure the rebase window, and confirm the squash without touching the command line.


Steps

  1. Open Sourcetree and navigate to your repository.
  2. In the history view, find the commits you want to squash. Right-click the commit one before the oldest commit you want to squash into and select 'Rebase children of <commit> interactively…'
  3. The Interactive Rebase window will open — leave the top commit unchanged and change the action on the remaining commits you want to squash.
  4. Click 'OK' to confirm and finish the squash.
  5. Sourcetree will perform the rebase and squash the commits into a single commit in your history.

📌 Why this matters

Squashing commits in Sourcetree lets developers consolidate messy, incremental commits into a single, meaningful entry in their Git history — all without writing a single command. This is essential for maintaining a clean, reviewable commit log before merging feature branches or submitting pull requests. Sourcetree's interactive rebase interface makes this Git workflow accessible to developers who prefer a visual Git client over the terminal. Keeping commit history tidy improves code review quality, simplifies debugging with git bisect, and enforces better version control practices across teams.
Your product deserves an interactive demo
Start free
Similar Articles
Sourcetree

How to Update Sourcetree Mercurial

Madhav Bhandari
Director of Marketing @ Storylane
Sourcetree

How to Add SSH Key in Sourcetree

Madhav Bhandari
Director of Marketing @ Storylane
Sourcetree

How to Change User in Sourcetree

Madhav Bhandari
Director of Marketing @ Storylane
No items found.
Platform
Interactive Demos
Sandbox Demos
Hubs
RepX
Integrations
Solutions
Product Marketers
Growth & Demand Gen
Sales Reps & AEs
Presales & SEs
Customer Success
Product Managers
Customers
Demo Showcase
Customer Stories
Finer Demos Club
Features
Demo Signals
Personalization
Deal Intelligence
Resources
Blog
The Plot
Tutorials
Help Docs
What’s New
Demo Dundies
Company
Careers
Pricing
Partners
Contact
Trust Center
Backed by
Chrome Extension Icon
Chrome extension
Download
Desktop app
Download
Built in San Francisco Bay Area - ©2026 Storylane
Privacy PolicyTerms & Conditions
X Corp (formerly Twitter)LinkedIn
This website uses cookies to ensure you get the best experience on our website. Learn More
Got it
This website uses cookies to ensure you get the best experience on our website. Learn More
Got it