Sublime Forum

Commit message template?

#1

Is there a way to pre-fill the commit message with a template? In my git config, I like to have a template file that gets pre-filled into the commit message. SublimeMerge doesn’t seem to respect this setting in my config, nor does adding:

{
    "template": "/path/to/commit-template.txt"
}

to Commit Message.sublime-settings seem to work.

Alternatively, is there documentation somewhere about how to configure Commit Message.sublime-settings?

0 Likes

#2

These are the settings that I know of for Commit Message.sublime-settings:

{
    "rulers": [72],
    "spell_check": true,
    "word_wrap": true
}

I’m not aware of support for commit templates in Sublime Merge. Feel free to create an enhancement request: https://github.com/sublimehq/sublime_merge/issues

1 Like

#3

You can also use the syntax setting as well; for example:

{
    "syntax": "Packages/Git Formats/Git Commit.sublime-syntax",
    "rulers": [72, 50]
}
1 Like

#4

For reference, this was added already.

Latest comments:

Hi all - support for the Git config variable commit.template was added in Sublime Merge Build 2057 (development build) and will be available in the next stable build :slight_smile:

Just a quick note that this is now available in the latest stable build of Sublime Merge (2059).

1 Like