---
title: "Interactive rebase on a Mac"
description: "Squash, reorder and reword the last few commits with interactive rebase, and read the plan in gitā before it rewrites the branch."
url: https://getgita.app/nl/guides/interactive-rebase
lang: nl
---

# Rewrite the last few commits

Interactive rebase turns a messy branch into the history you meant to write.

Updated 2026-11-17

## The short answer

Interactive rebase rewrites commits that are still only yours: squash two into one, put them in a better order, or reword a message that no longer says what the change does.

## A plan, then the rewrite

You pick the commits. For each one you keep it, reword it, squash it into the one before, or drop it. Git then replays them in that order, and the commits get new SHAs.

Do this while the commits are still only on your Mac. Once other people have based work on them, a rewrite means they have to reconcile their copies.

## What you can change

Squash folds a fixup into the commit it belongs with. Reorder puts the setup before the change that depends on it. Reword replaces a message like "wip" with one a reviewer can read. You can also edit a commit's contents and split it.

## In gitā

Interactive rebase opens as a sheet that lists the plan before anything runs. Merge, rebase onto another branch, cherry-pick and revert use the same kind of sheet, and a conflict editor when a replay stops.

The page is [Merge and rebase](https://getgita.app/nl/features/merge-and-rebase).

## Questions, answered

### When is a rebase the right tool?

When the commits are still only yours, and the history would be clearer squashed, reordered or reworded.

### What happens to the old commits?

Git writes new commits for the replay. The previous SHAs stay in the reflog for a while.

[All guides](https://getgita.app/nl/guides.md)

- **Download voor macOS:** https://github.com/rolottr/gita/releases/latest
- **Bekijk op GitHub:** https://github.com/rolottr/gita

---

Apple, macOS and Mac are trademarks of Apple Inc. Git is a trademark of Software Freedom Conservancy. GitHub is a trademark of GitHub, Inc. Vercel is a trademark of Vercel Inc. Claude is a trademark of Anthropic, PBC. gitā is independent software and is not affiliated with any of them. Issues: https://github.com/rolottr/gita/issues
