SOLVED: “Commit your changes or stash them before you can merge” – what to do ?

Sometimes you work with your changes through bitbucket online, after you open SourceTree on your local computer and after when you upload your changes, you can receive an error that some of the commits are not committed.

Steps to resolve:

Discard the local changes


Commit the change using

Stash it

Stashing acts as a stack, where you can push changes, and you pop them in reverse order.

To stash, type

Do the merge, and then pull the stash:

If you have an extra message, make this command:

Discard the local changes

Or: Discard local changes for a specific file


Leave a Reply

Your email address will not be published. Required fields are marked *