Skip to content
Versora

Manual

Commits

Message templates

9 min read

On this page

A template is a commit message ready to be filled in, for example:

fix({branch}): 

Refs {issue}

Versora brings together three sources of templates:

SourceWhere it livesWho sees it
From Git (commit.template)The file set in commit.template in gitWhoever uses that git configuration (also on the command line)
From the repositoryFiles in .versora/commit-templates/ in the repository itselfThe whole team, once the files are committed
My templatesVersora's preferencesOnly you, in all repositories

Use a template in the commit box

Where to find it

  • Commit box › Templates button, right below the description (tooltip: "Commit message templates (the repository's and yours)").

Step by step

  1. Click Templates. The Message templates list opens, grouped into From Git (commit.template), From the repository and My templates.
  2. Each row shows the template's name and its first line. Hover to see the whole text.
  3. Click the template (or move with the arrow keys and press Enter or Space).
  4. If the box already had text, the app asks "Replace the message with the template?": "The summary and description you wrote will be replaced with the "Bug fix" template. The chosen co-authors stay." Click Replace to go ahead.
  5. The template goes into the box: the first line becomes the summary and the rest becomes the description, with the variables already replaced and without the comment lines.
  6. Fill in what's missing and commit.

Esc or a click outside closes the list without changing anything.

OptionWhat it doesDefault
Comment linesLines that start with # are removed from the text when the template is usedAlways
Variables{branch}, {issue}, {author}, {email}, {date} and {files} are replaced when used (see the next section)Always
Co-authorsThe co-authors already chosen stay in the message after it's replaced with the templateAlways

What Versora does in git

For git's template and the {author} and {email} variables, the app reads the configuration:

bash
git config --path commit.template
git config core.commentChar
git config user.name
git config user.email

The commit is the usual git commit -F -: git doesn't get the template, only the finished message.

How to undo

Replacing with the template changes the box's text and has no undo of its own. That's why the app asks first when there was already text written.

Caveats and messages

  • "No templates yet. Save the current message as a template or create one in Preferences.": there's no template in any of the three sources.
  • After using a template, check the summary: a template with fix({branch}): leaves the short description for you to complete.

See also

Template variables

The variables are replaced with their current value at the moment the template is used.

Where to find it

  • The list also shows up in Preferences › Commit message › Message templates › Variables: (hover over each one to see what it becomes).
VariableBecomesExample
{branch}Current branchfeature/123-login
{issue}Issue from the branch name (ABC-123 or #123)#123 in feature/123-login; PROJ-45 in feature/PROJ-45-login
{author}Your name (user.name)Ana Souza
{email}Your email (user.email)[email protected]
{date}Today's date (YYYY-MM-DD)2026-11-26
{files}Staged fileslogin.ts, login.test.ts

Details on each one:

  • {branch} is empty in detached HEAD.
  • {issue} first looks for a Jira key anywhere in the branch name (PROJ-45) and, without one, a number at the start of the last part of the name (123-login becomes #123). Without any of that, it's empty.
  • {author} and {email} come from the identity that applies in the repository.
  • {date} uses the same format in every language.
  • {files} shows only the file names (without the folder), up to five; beyond that, it adds the remaining count, for example a.ts, b.ts, c.ts, d.ts, e.ts (+3).
  • A variable that isn't on the list stays as written ({version} stays {version}).

Step by step

  1. Write the variable between braces in the template text, in lowercase: Refs {issue}.
  2. Use the template through the Templates button: the value takes the variable's place.

What Versora does in git

Reads only: the current branch, the staged files and git config user.name / user.email.

Caveats and messages

  • Git's commit.template that goes into the empty box on its own (see the last section) also has its variables replaced, like a template chosen through the Templates button. The values are the ones at the moment the box is filled: when the panel opens and after each commit. That's why {files} usually comes out empty in this case (right after a commit, nothing is staged); to get the list, choose the template through the Templates button after staging.

See also

Save the current message as a template

When you've written a message you're going to repeat, it can become a template of yours or of the team's.

Where to find it

  • Commit box › Templates › Save the current message….

Step by step

  1. Write the message in the commit box (summary and, if you want, description). Where it will vary, write the variable, for example fix({branch}): .
  2. Click Templates › Save the current message….
  3. In the Save as template window ("The current message becomes a template. Variables like {branch} are filled in when it's used; co-authors aren't saved."), fill in Name (for example "Bug fix").
  4. In Where to save, choose My templates (all repositories) or In the repository (.versora/commit-templates, for the team).
  5. Click Save.
  6. If you saved it in the repository, commit the new file so the team gets the template.
OptionWhat it doesDefault
NameThe template's name. In the repository, it becomes the file nameRequired
Where to save › My templates (all repositories)Saves it in Versora's preferencesSelected
Where to save › In the repository (.versora/commit-templates, for the team)Creates .versora/commit-templates/<Name>.txt in the working directory—

The saved text is the summary, a blank line and the description. The Co-authored-by lines are removed: co-authors are chosen with each commit.

What Versora does in git

Nothing in git. In the repository, the app writes a .txt file; it shows up as a new file in the changes, for you to include in a commit:

bash
git add ".versora/commit-templates/Bug fix.txt"
git commit -F -

In the file name, letters, numbers, spaces, -, _ and . are kept; any other character becomes -. The name can be up to 80 characters long.

How to undo

  • Your template: delete it in Preferences › Commit message (see the next section).
  • Repository template: the file is a regular change. Discard it before the commit (see Discard changes) or delete it in Preferences.

Caveats and messages

  • "Write the message before saving it as a template.": the box is empty.
  • "Template "Bug fix" saved.": saved in My templates.
  • "Template saved to .versora/commit-templates/Bug fix.txt. Commit the file so the team gets the template.": saved in the repository.
  • "Give the template a name with letters or numbers (up to 80 characters).": the name can't be used as a file name.
  • "Couldn't save the template: …": the folder couldn't be created or the file couldn't be written (permissions, file open in another program).

See also

Manage templates in Preferences

In Preferences › Commit message you create, edit and delete your templates and those of the open repository, and you see git's commit.template.

Where to find it

  • Preferences (Ctrl+,) › Commit message › Message templates.
  • Commit box › Templates › Manage templates….
  • Palette (Ctrl+P): "Commit message preferences".

Step by step

  1. Open Preferences › Commit message. The group's note explains: "They show up under the Templates button of the commit box: yours (all repositories), the repository's (files in .versora/commit-templates/, for the team) and Git's commit.template. Lines that start with # are comments."
  2. To create a template of yours, click New template… next to My templates.
  3. Fill in Name and Text (the first line is the summary) and click Save.
  4. To create a team template, use New template… next to Templates of the app-web repository (only with a repository open in a tab).
  5. To edit, click the template in the list: the same editor opens, with Delete, Cancel and Save.
  6. For a repository template, commit the file that was created, changed or deleted.
GroupWhat it showsNote
My templates"They apply to every repository and are included when you export/import settings."With none: "No templates of yours yet."
Templates of the repository (repository name)"They live in .versora/commit-templates/: commit them so the whole team can use them."With none: "No templates in this repository."
commit.template"Git's, set in commit.template"Read-only: it's changed in the git configuration

In the repository, the app reads the .txt files (and also .md) in the .versora/commit-templates/ folder, in name order, up to 100 files of up to 64 KB each. The template's name is the file name without the extension.

What Versora does in git

Nothing in git. Repository templates are regular files:

  • Save writes the file (keeping CRLF line endings, if the file already used them);
  • renaming writes the new file and deletes the old one;
  • Delete deletes the file from the working directory.

How to undo

  • A template of yours that was deleted: it doesn't come back; create it again.
  • Repository template: until there's a commit, the change is a regular working directory change (it can be discarded). After the commit, it goes into the history like any file.

Caveats and messages

  • "Delete the template?" with "The file .versora/commit-templates/Release.txt will be deleted from the working directory (commit the deletion for the team)." and the Delete button: only for repository templates. A template of yours is deleted right away, without a question.
  • "The template is empty.": the text was left blank.
  • "… isn't a repository template.": the file isn't in the templates folder (protection against deleting some other file).
  • Your templates go along with Export settings, on Home (see Home and projects).
  • The company policy can hide the Commit message page or make it read-only.

See also

Git's commit.template

Git has its own message template option, commit.template. Versora honors that option: the template goes into the empty box on its own and also shows up under the Templates button.

Where to find it

  • Commit box (filled in on its own when it's empty).
  • Commit box › Templates › From Git (commit.template) group.
  • Preferences › Commit message › the repository's list (the commit.template row).

Step by step

  1. Set the template in git, for example git config commit.template .gitmessage (path relative to the root of the repository) or with --global for all repositories.
  2. Open the repository in Versora. With the commit box empty, the template is already in it.
  3. Fill it in and commit. After each commit, the empty box gets the template again.
  4. If you delete the text on purpose, it doesn't come back on its own until the next commit.
OptionWhat it doesDefault
Automatic fillingThe template goes into the empty box when the panel opens and after each commitWhenever there's a commit.template
Comment linesRemoved from the template, as git does: the ones that start with the core.commentChar character (or #)Always
Variables{branch}, {issue}, {author}, {email}, {date} and {files} are also replaced in automatic filling, with the values at the moment the box is filled (see Template variables)Always
Unfilled template warningBefore the commit, warns if the message is the same as the template, either as it is in the file or with the variables already replacedWhenever there's a commit.template

What Versora does in git

bash
git config --path commit.template   # a relative path counts from the root of the repository
git config core.commentChar

How to undo

Delete the text in the box or replace it with another template.

Caveats and messages

  • "The message is the same as the repository's template (commit.template), with nothing filled in": a warning in the "Before committing" dialog ("Message template" group). You can go back and fill it in or Commit anyway.
  • With Amend previous commit checked, the template doesn't go in: the previous commit's message applies.
  • In automatic filling, the variables ({branch}…) come already replaced. If you start writing before the replacement finishes (it reads your identity in git), your text stays and the template doesn't go in on top of it. {files} comes out with the files that were staged at the time of filling; to update it, choose the template again through the Templates button.

See also