GitKraken Desktop Documentation

Squash Git Commits in GitKraken Desktop

Last updated: June 2025

Squashing lets you combine multiple commits into one to clean up your Git history. This is helpful before pushing to a shared branch or finalizing a feature branch.


Squash Requirements

You can squash commits if they meet all the following conditions:

  • More than one commit is selected
  • Commits are in a straight line (ancestor-descendant)
  • Commits are chronologically consecutive
  • The oldest selected commit has a parent

To select multiple commits, hold Shift or Cmd/Ctrl and click the commits.

Selecting and squashing multiple commits
Select a commit range and right-click to squash.

After squashing, the new commit appears in the Commit Panel. You can click the commit message to amend and consolidate the messages from the squashed commits.

Amending a squashed commit message
Click the commit message to edit after squashing.

Push a Squashed Commit

Avoid pushing commits to your remote that you intend to squash. If you’ve already pushed them, and then squash locally, your local and remote branches will differ.

Local branch has squashed commit while remote shows all commits
After squashing, your local branch no longer matches the remote.

When you push, GitKraken shows a warning that your local branch is behind the remote. This is expected, because the squashed commit rewrites history.

Warning about diverging history when pushing squashed commits
A warning appears because your branch history changed.

To resolve this:

  • Click to overwrite the remote branch with your squashed history
Force Push button and warning in GitKraken
Use Force Push to push squashed commits and rewrite remote history.

Warning: Force pushing is a destructive action. It replaces remote history and can disrupt teammates working on the same branch. Use with caution.

Have feedback about this article? Did we miss something? Let us know!
On this page