Interactive Rebase

A new major version of Tower has recently been released. This feature is included in this new version of Tower. If you haven't updated yet, have a look at the new features.

With Interactive Rebase, Git offers a very powerful tool to edit / rewrite / reorder / etc. existing commits. Please note that Interactive Rebase is only available for the currently checked out branch. Therefore, make sure that your local HEAD branch is selected in the sidebar.

Note: Use Interactive Rebase with care - because it will rewrite your commit history! As a rule of thumb, you should never rewrite commits that other people are already working with!

Delete

Interactive Rebase allows you to delete one or multiple commits. With you HEAD branch selected in the sidebar, choose the commits in question and right-click them. The contextual menu will then contain an option to Delete "<hash>" (or, in case you selected multiple commits: Delete N Revisions).

Squash

Squashing allows you to combine multiple commits into one. Simply select multiple commits in your HEAD branch's commit listing.

  • Right-click them and select Squash N Revisions in the contextual menu.
  • Alternatively, you can drag & drop them onto another commit to squash them.

When performing a Squash, the commit messages of all commits will be concatenated. The new, squashed commit appears at the earliest position of the previously selected commits.

Fixup

Fixup is very similar to squashing. However, while squashing preserves / combines all commit messages, fixup will use just the message of the oldest commit.
To start a Fixup, simply select multiple commits in your HEAD branch's commit listing.

  • Right-click them and select Fixup N Revisions in the contextual menu.

The Fixup then adds the changes of newer commits to the target commit. The target commit is referenced in the confirmation dialog.

Reorder Commits

Interactive Rebase also allows you to reorder commits. Simply drag and drop a commit between two existing commits to reorder history.

Edit Revision

Editing an existing commit allows you to both change the contained modifications and the commit's message. To edit an existing revision, right-click it in the commit listing and select Edit "<hash>" from the contextual menu.

This will open the Working Copy view for this commit, where you can can change its message, the contents of the commit and even split it up.

To submit the changed revision, use Continue after committing your changes.

Edit Commit Message

To edit only the commit message of a revision, right-click the revision in the commit listing. Then, choose Edit Commit Message for "<hash>" from the contextual menu to change the commit's message.