Last updated: February 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.
Quick Start
Squash multiple commits into one in GitKraken Desktop to produce a cleaner commit history.
- In the Commit Graph, hold Shift or Cmd/Ctrl and click to select two or more commits. The selected commits must be consecutive, in a straight ancestor-descendant line, and the oldest must have a parent commit.
- Right-click the selection and choose Squash [N] commits.
- The squashed commit appears in the Commit Panel. Click the commit message to edit and consolidate the messages from the original commits.
If you need to push a squashed commit that was already pushed: GitKraken Desktop will warn that your local branch is behind the remote. Click Force Push to overwrite the remote branch with the squashed history. Force pushing is destructive and rewrites remote history, so use it only on branches where teammates are not actively working.
Squashing is not available for merge commits or commits that do not meet the consecutive ancestor-descendant requirement.
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.

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.

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.

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

To resolve this:
- Click to overwrite the remote branch with your squashed history

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