Please explain squashing to me

Hello,

I'm relatively new to SourceTree. I've used it for a few months now and the I feel I understand the basic functionalities and features, but there are other features I'm still trying to understand.

In this case, I'm trying to understand how squash works.

It seems I can only squash commits once they're pushed to the master repository, not before. Is this true?

Also, why can I only squash through the rebasing interface? Squashing isn't necessarily rebasing, is it? If I click on the oldest commit, and say "rebase children of...", I can then squash all later commits to that one. But then what happens once I say "OK"? Will it rebase my code to that oldest commit? WITH the later ones squashed into it (effectively meaning there should be no change)? And what if I say "cancel"? It seems to undo my squash. So I can't squash without rebasing.

Can someone please explain how this works? Thanks.

1 answer

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published 7 hours ago in Hipchat

Moving from Hipchat to Stride? Here’s what you’ll love

Heya, Hipchat friends! We’re so happy you’re checking out   Stride. Whether you know it or not, you have been instrumental in making Stride come to life. Every feature, design, and functionality...

30 views 0 3
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you