Tower

Help & Support

Committing Changes

A commit persists all staged changes in your local repository.
Remember: Only staged changes...
...will be included in a commit. Changes that you have not staged will simply remain as local modifications in your working copy - waiting to be either staged & committed later or discarded.

Tower's commit area expands as soon as you click into the commit message subject textfield ("Short Commit Summary"). Alternatively, you can press ⌘ + ⇧ + C from anywhere and directly start typing your commit message.

The Commit button is enabled as soon as both...

  • a commit subject was entered (filling the "Extended Description" textfield is optional) and
  • staged changes are present.

Checking the Sign-Off option automatically appends your name at the end of the commit's message.

Customizing the Commit Composer

You can customize the settings for Tower's commit composer in Preferences -> Editor.
Here, you can:

  • set a maximum character limit for your commit titles
  • configure hard line wrapping
  • set a maximum character limit for each line in the commit description

When hard line wrapping is set, you will see a page guide in the commit body text view. Lines that are too long will be highlighted and the text view uses a monospace font.

You will also find a “Reformat Paragraph” option in the “Edit” menu: select a paragraph or line and it will reformat and insert new lines according to the current line limit. You can also access this option using the keyboard shortcut ⌘ + ⇧ + W.

Committing will automatically wrap lines so that they do not exceed the configured limit.

Referencing issues, commits and files

Tower's commit composer allows you to directly reference issues, commits and files, helping you create more meaningful commit descriptions.

  • Issues: You can now search for and autocomplete issues in your commit messages. Simply type the # symbol from the subject or body field and type a few characters to find the required issue.
    We also support autocomplete for common Service keywords: “Resolves #”, “Closes #ISSUE” and “Fixes #ISSUE”, which reference and close an issue from the commit.

Supported issue trackers
Tower currently supports GitHub, GitLab and Azure DevOps for the new issue autocomplete feature.

  • Commit References: Just like issue numbers, you can search for and autocomplete commit references by typing c:.
  • Files: Specific changed files from your Working Copy can be quickly referenced by typing \.

You can type the / character to see a list of the above commands available for each field.

Make sure you configure a service account
If you are having problems seeing the list of issues or commits, please make sure you have configured a service account in Tower's Services View. Then, connect it to your repository by selecting your remote (origin), right-click and select "Edit Connection Settings" and make sure the service account is selected in the dropdown.

Changing Your Last Commit

The Amend option allows you to change your very last commit. Amending rewrites the commit history so that you will not be able to see that the commit was changed at all.

You can add additional changes to your last commit or just modify its message (or both). When checking the amend option in the commit dialog, Tower prefills the message textfield with your last message.

Tip: Tower offers a very quick way to use amend in cases when you don't need to change the message (but instead just want to add those two forgotten changes...): simply hold the key to quickly transform the Commit button into an Amend button.

Use Amend with Care!
Be careful when using the amend option: don't amend commits that you've already pushed to a remote repository!

Changing A Previous Commit Using "fixup!" And "squash!"

Tower also supports Git's rebase "autosquash" feature. It works similarly to amend, but it allows you to amend any (unpushed) commit in the History, not just the last one.

In order to use it, you will need to give the same subject to your new commit as the commit you want to amend, and prefix it with fixup! or squash!.
Typing fixup! or squash! in the subject will also show an autocomplete of the last commits of the current HEAD branch to quickly fill the correct commit subject for the chosen action.

Once there are fixup commits on the HEAD branch detected, Tower will offer the “Autosquash” option in the History. Selecting this option will then execute the rebase command and amends the commits accordingly.

User Profiles

User Profiles are templates that allow you to quickly set or switch your committer identity.

Read more about how to add, manage and use User Profiles.