Tower Icon

Committing Changes

A commit takes all staged changes and persists them in your local repository.

REMEMBER:Only changes that you previously staged will go into a commit. Modified or created files that were not checked in the Status list are unstaged and will stay as modified files on your disk - waiting to be staged and committed later.

If you don't have any staged changes, committing is still possible: The "amend" option allows you to change your last commit where modifying the commit's message can be your only change.

To commit staged changes

  1. Click the "Commit" toolbar button or use the keyboard shortcut (CMD+ALT+C).

  2. In the following dialog you need to enter a message describing the changes you made. Git considers the first line of text as the subject and (after two line breaks) the remainder as the "body" of your message.

  3. Check the "Sign-Off" option if you want your name automatically appended at the end of the message.

To change your last commit

The "amend" option allows you to change your last commit. Amending rewrites the log history so that you will not be able to see that the commit was changed. Using amend you can add another set of changes to your last commit or just modify its message - or both.

By checking the amend option in the commit dialog Tower will prefill the message textfield with your last message (if there isn't already text contained).

WARNING:Be careful using the amend option - don't amend commits that you have already pushed to a remote repository!

Composing a commit message

Depending on what works best for you there are two ways to compose a commit message:


Related Topics

Overview of the Status area

Staging changes

Undoing changes