GitKraken Desktop Documentation

Squash Git Commits in GitKraken Desktop

Last updated: January 2026

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.

User right-clicks a selected range of 4 commits and chooses Squash 4 commits from the context menu in GitKraken Desktop
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.

GitKraken Desktop showing a squashed commit with multiple combined messages, ready to be edited by clicking the message area
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.

GitKraken Desktop graph showing a local branch with a single squashed commit, while the remote branch still displays the original multiple 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.

GitKraken prompt showing branch 'Feature/xmltest' is behind its remote and warning that pushing squashed commits may require a force push.
A warning appears because your branch history changed.

To resolve this:

  • Click to overwrite the remote branch with your squashed history
GitKraken warning message stating 'Force push is a destructive action and cannot be undone' with Force Push and Cancel buttons.
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